Comments (5)
Please give me a code and version about error.
from bard-api.
def bardChat(prompt):
import bardapi
cookies = readCookieFile('bard')
BARD_TOKEN = ''
for item in cookies:
if item['name'] == '__Secure-1PSID':
BARD_TOKEN = item['value']
if BARD_TOKEN == '':
return {'RESULT': False, 'MESSAGE': 'Bard Chat token is not found!'}
print('INFO: Bard Chat')
try:
response = bardapi.core.Bard(token=BARD_TOKEN).get_answer(prompt)
text = response['content']
text = re.sub(r'(?<![0-9]):(?![0-9])', ': ', text)
links = ''
if len(response['links']) > 0: links = '\nLinks:' + '\n'.join(response['links'])
ids = f'{response["conversation_id"]} {response["response_id"]} {response["choices"][0]["id"]}'
return {'RESULT': True, 'DATA': f'{text}{links}'}
except Exception as e:
return {'RESULT': True, 'DATA': f'Bard Chat: Sorry! I got an error!\n{str(e)}'}
from bard-api.
I use
version = "0.1.11"
from bard-api.
I'm also having this problem from today, it doesn't work at all any more.
from bard-api.
All the modifications have been completed. Once you install the GitHub version again, you will be able to use version 0.1.14.
pip install git+https://github.com/dsdanielpark/Bard-API.git
from bard-api.
Related Issues (20)
- ChatBard: token_from_browser HOT 9
- ImportError: cannot import name 'BardCookies' from partially initialized module 'bardapi' (most likely due to a circular import) HOT 6
- Some code errors in README examples , os module import HOT 4
- Bard __SECURE-1PSID does not match HOT 2
- Exception: SNlM0e value not found. Double-check __Secure-1PSID value or pass it as Bard(token='xxxxx') HOT 1
- Google changed the the way "__Secure-1PSID" looks, how to use this package effectively,the cookie values does not end in '.' period now HOT 8
- Multiple-Cookies has been changed. HOT 15
- Image generation HOT 4
- Google renames its chatbot Bard to Gemini HOT 40
- Gemini Ultra? HOT 4
- TooManyRedirects: Exceeded 30 redirects. HOT 1
- Check out this Bard/Gemini project. HOT 2
- Google changed their __Secure-1PSID value stracture HOT 2
- ask_about_image Not working HOT 2
- Cookies refreshing very often and getting 429 all the time HOT 2
- How can automaticly get cookies value in no gui servers? HOT 2
- Please, go to Gemini-API `https://github.com/dsdanielpark/Gemini-API`
- a conversation towards getting advance AI HOT 1
- Reflection on the Bard API Project
- Connecting Geminei to Ads HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bard-api.