How to use Assistants API and the best way to do it
Вставка
- Опубліковано 11 чер 2024
- In this video we will explore on how we can use the Assistants web Ui to create out assistants and configure it then use it from our python script.
Code files for this project at Patreon: / explaining-how-102574497
UPDATE: When we set truncation strategy of type "last messages" then we must also pass "last messages key with the object as:
max_prompt_tokens=20000, # if you will use file search set this to 20k or more
truncation_strategy={"type": "last_messages", "last_messages": 5}, # also can be "auto"
otherwise like this:
max_prompt_tokens=20000, # if you will use file search set this to 20k or more
truncation_strategy={"type": "auto"}, # also can be "auto"
if you dont give the "last messages" param when using "last messages" strategy then in the future you may see 400 error being returned
Auto Streamer: www.autostreamer.live/
Search 200+ echohive videos and code download links:www.echohive.live/
CodeHive 900+ GPT python chat apps: www.codehive.app/
Chat with us on Discord:
/ discord
Follow on twitter(X) : / hive_echo
CHAPTERS;
00:00 Intro
01:25 Creating an assistant for chat only
04:15 Vectorstore setup
06:38 Testing tool use
08:04 Possible max prompt tokens bug
11:09 general review
15:02 Code review
21:11 Auto Streamer
#aiassistance #aiassistant #aiagents #openai #openaiapi #gpt4 #gpt4turbo #artificialintelligence #largelanguagemodels #pythonprojects #pythonai #pythonprogramming
Code files for this project at Patreon: www.patreon.com/posts/explaining-how-102574497
UPDATE: When we set truncation strategy of type "last messages" then we must also pass "last messages key with the object as:
max_prompt_tokens=20000, # if you will use file search set this to 20k or more
truncation_strategy={"type": "last_messages", "last_messages": 5}, # also can be "auto"
otherwise like this:
max_prompt_tokens=20000, # if you will use file search set this to 20k or more
truncation_strategy={"type": "auto"}, # also can be "auto"
if you dont give the "last messages" param when using "last messages" strategy then in the future you may see 400 error being retu
Auto Streamer: www.autostreamer.live/
Search 200+ echohive videos and code download links:www.echohive.live/
CodeHive 900+ GPT python chat apps: www.codehive.app/
Chat with us on Discord:
discord.gg/PPxTP3Cs3G
Follow on twitter(X) : twitter.com/hive_echo
echohive, This is so fun! I'm happy I found your channel!
Happy to hear you like it! ❤️
This is exactly I was looking for. Thanks for the tutorial !!
I am happy you find it useful
Clear and well contextualized
Thank you! 🙏
Great video - thank you
Glad you enjoyed it. Thank you too! 🙏
Thanks for the quick tutorial!
You are welcome!
Great video but audio is painful 😩
Yeah I hear you. Sorry about that :( I have fixed the audio in my later videos. Let me know if they sound better to you if you find the time. Thank you for the feedback 🙏
The titles popping up every minute are distracting
Thank you for the feedback 🙏 I will separate them further apart in future videos