-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: allow users to chat with apis #1612
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Risk Level 3 - /home/runner/work/quivr/quivr/backend/routes/chat_routes.py
Example code snippet for the second point: def set_chat_question_attributes(chat_question, brain):
chat_question.model = chat_question.model or brain.model or \"gpt-3.5-turbo\"
chat_question.temperature = chat_question.temperature or brain.temperature or 0.1
chat_question.max_tokens = chat_question.max_tokens or brain.max_tokens or 512
return chat_question Then replace the duplicated code with a call to this function: chat_question = set_chat_question_attributes(chat_question, brain) Risk Level 3 - /home/runner/work/quivr/quivr/backend/llm/api_brain_qa.py
Example: try:
arguments = json.loads(function_call[\"arguments\"])
except json.JSONDecodeError:
arguments = {} This way, you're only catching the exception that gets raised if Risk Level 3 - /home/runner/work/quivr/quivr/backend/repository/brain/create_brain.py
Example: try:
created_brain = supabase_db.create_brain(brain)
except Exception as e:
logger.error(f'Error creating brain: {e}')
raise
Example: for secret_name, secret_value in secrets_values.items():
if not isinstance(secret_name, str) or not isinstance(secret_value, str):
raise ValueError('Invalid secret name or value')
create_secret(
user_id=user_id,
brain_id=created_brain.brain_id,
secret_name=secret_name,
secret_value=secret_value,
) 🔒🔁🔧 Powered by Code Review GPT |
73c9221
to
d2d121e
Compare
T'es une machine <3 @gozineb vous êtes chauds ! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Damn, awesome PR ! Really cool demo too 🔥 🔥 🔥 🔥 🔥 🔥 🔥
Thanks guys !! 🥳 |
🤖 I have created a release *beep* *boop* --- ## 0.0.109 (2023-11-13) ## What's Changed * feat: add APIBrainQA by @mamadoudicko in #1606 * feat: allow users to chat with apis by @mamadoudicko in #1612 * feat(docker): use multi-stage Docker builds for smaller images by @shidenkai0 in #1614 ## New Contributors * @shidenkai0 made their first contribution in #1614 **Full Changelog**: v0.0.108...v0.0.109 --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
🤖 I have created a release *beep* *boop* --- ## 0.0.109 (2023-11-13) ## What's Changed * feat: add APIBrainQA by @mamadoudicko in QuivrHQ/quivr#1606 * feat: allow users to chat with apis by @mamadoudicko in QuivrHQ/quivr#1612 * feat(docker): use multi-stage Docker builds for smaller images by @shidenkai0 in QuivrHQ/quivr#1614 ## New Contributors * @shidenkai0 made their first contribution in QuivrHQ/quivr#1614 **Full Changelog**: QuivrHQ/quivr@v0.0.108...v0.0.109 --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
You can now create a brain which can fetch data from external APIs with or without authentification
Screen.Recording.2023-11-09.at.14.35.34.mp4
Screen.Recording.2023-11-09.at.14.38.53.mp4
Screen.Recording.2023-11-09.at.14.37.27.mp4