Just FYI, they have been consistently using a lower case o in the model name so it's clear it's the letter. Otherwise it looks like it's GPT forty or 4.0, which aren't right.
Is it possible to save the entire conversation to a local db. Then in between conversations, before starting a new one, the code pulls the previous conversations and feeds that into the prompt first so the “girl friend” has all the previous context(memory) to pull from?
That's a very good question. On the official page of the text-to-speech guides (platform.openai.com/docs/guides/text-to-speech), it still states the old text: 'There is no direct mechanism to control the emotional output of the audio generated'.
I was thinking the same thing. Like persist all the conversations into a local db table. Then each time the “gf” is instantiated feed it the previous conversations via the prompt so it would have “memory/context”. Granted this could amount to a ton of data over time. Or allow the chat bot a method to go search the local db and use key words on the table data so it would be easier to parse thru. Similar to the AI Car repair bot he made
good video! One question, can you talk about how to make an app for Android/IOS when they release the API with vision and audio modes? I think that using low code tools like Flutterflow will be easy. an app for mobile devices I think they will be much more effective than for the web
it will take a few weeks before they release the full new voice system and api aswell as the video function and api. When they do , you should update this project. it will be a lot more imersive. and it should be able to litteraly watch a movie with you and comment on what it sees and have a very detailed emotional voice with very fast response time. :)
Thank you for clarifying that, @arianaponytail! I can't wait either. It's exciting to know that the vision capabilities can already be used with the new model and API.
Sure, please send an email to sebastian@ai-for-devs.com with your GitHub alias or join www.skool.com/ai-for-devs/about for free access to all courses and source code (only today).
Absolutely, you can easily replace Whisper and the audio API call with any open-source model of your choice, or use a service like Replica, which provides easy access to such models.
We're using the GPT-4o model for the chat completion endpoint due to its faster inference speed, rather than the GPT-4 or GPT-4 Turbo models. As of now, I don't believe there is a way to use GPT-4o via API directly with sound files. If there is a method, please let me know.
Is there a way to create such an ai gf or person with an offline model? With fast response times etc that updates itself with the latest internet knowledge base when needed etc?
Creating an offline AI girlfriend or persona with fast response times and high-quality inference is challenging due to the significant hardware requirements. The computational power needed for real-time processing and maintaining up-to-date knowledge is substantial, making it difficult to achieve the same performance as cloud-based solutions without high-end hardware. However, you can keep everything local that should be private by using a local vector store for sensitive data. This hybrid approach allows you to balance performance and privacy by running core models offline and updating online as needed.
@@ai-for-devs thx. I don't have Internet access all the time so an offline alternative would be awesome. Also the one thing bothering me when using gpt4 is the long response times as it has to check the web. For an ai companion it doesn't necessarily need the most recent news to be socially useful. Maybe I'm wrong but there seem to be more advantages for an offline ai person. Faster responses as it doesn't have to check the web (also no queues), versatile use as it can be used anywhere (isn't reliant on constant Internet access), cost effective as there aren't monthly fees, secure as it runs locally, up to date (kinda) with most recent Internet updates integrateable at will, like once every month (topics adjustable to the ai persona), etc.
You could add a condition like: ... print(transcription.text) if "goodbye" in transcription.text.strip().lower(): print("Goodbye detected, exiting loop.") break
very good! however, i get this error after the bot has created the output.mp3 on my first question, when i then ask a follow-up question, this error occurs. so it cannot change the output.mp3 once it has been created. Traceback (most recent call last): File "F:\BOTS\her-gpt4o\app.py", line 32, in response.stream_to_file('output.mp3') File "C:\Users\atzek\.conda\envs\her\lib\site-packages\typing_extensions.py", line 2636, in wrapper return arg(*args, **kwargs) File "C:\Users\atzek\.conda\envs\her\lib\site-packages\openai\_legacy_response.py", line 423, in stream_to_file with open(file, mode="wb") as f: PermissionError: [Errno 13] Permission denied: 'output.mp3'
To avoid this issue, you can create temporary files or change the filenames based on timestamps or an increment. This way, each response gets a unique file name, preventing conflicts.
AI boyfriends? Absolutely! Just like AI girlfriends, you can create an AI boyfriend with the same tech. He’ll be attentive, always remember anniversaries, and never complain about watching romantic comedies.
Thank you for putting this out so quickly! I've been wanting try something with the new release
Thank you 🙏
Just FYI, they have been consistently using a lower case o in the model name so it's clear it's the letter. Otherwise it looks like it's GPT forty or 4.0, which aren't right.
Thank you for the clarification! I'll make sure to consistently use the lowercase "o" in the next videos.
Absolutely CRAZY!! This is some really interesting/exciting things.
It really is!
Is it possible to save the entire conversation to a local db. Then in between conversations, before starting a new one, the code pulls the previous conversations and feeds that into the prompt first so the “girl friend” has all the previous context(memory) to pull from?
Yup, there are some tutorials out there for it
There is an easy way to do this by using autogen teachable agents. Please have a look at th-cam.com/video/szYeaUlsaNY/w-d-xo.htmlsi=DhT82kIjkLsxHSiL
Amazing! Thanks for sharing!
is there any way to have that magical voice expression as showed in the openai presentation?
That's a very good question. On the official page of the text-to-speech guides (platform.openai.com/docs/guides/text-to-speech), it still states the old text: 'There is no direct mechanism to control the emotional output of the audio generated'.
@@ai-for-devs maybe not emotionally related outputs, but you could implement a system with natural interrupts
Great ! , can I make it just answer from spesific own data ?
Answer depending on the Sql table data or something ?
I was thinking the same thing. Like persist all the conversations into a local db table. Then each time the “gf” is instantiated feed it the previous conversations via the prompt so it would have “memory/context”. Granted this could amount to a ton of data over time. Or allow the chat bot a method to go search the local db and use key words on the table data so it would be easier to parse thru. Similar to the AI Car repair bot he made
There will be a video next week about using vector stores with gpt4o at ai-for-devs.com
@@ai-for-devs sweet!
good video! One question, can you talk about how to make an app for Android/IOS when they release the API with vision and audio modes? I think that using low code tools like Flutterflow will be easy. an app for mobile devices I think they will be much more effective than for the web
Great idea. Let me see.
it will take a few weeks before they release the full new voice system and api aswell as the video function and api. When they do , you should update this project. it will be a lot more imersive. and it should be able to litteraly watch a movie with you and comment on what it sees and have a very detailed emotional voice with very fast response time. :)
Thank you for clarifying that, @arianaponytail! I can't wait either. It's exciting to know that the vision capabilities can already be used with the new model and API.
Greater tutorial as always. I can't find the code on your github. Can you provide it pls.
Sure, please send an email to sebastian@ai-for-devs.com with your GitHub alias or join www.skool.com/ai-for-devs/about for free access to all courses and source code (only today).
hey can we change the voice using by any open source model ?
Absolutely, you can easily replace Whisper and the audio API call with any open-source model of your choice, or use a service like Replica, which provides easy access to such models.
FYI this isn’t using the new conversation mode that they rolled out with 4o, this is the old version.
We're using the GPT-4o model for the chat completion endpoint due to its faster inference speed, rather than the GPT-4 or GPT-4 Turbo models. As of now, I don't believe there is a way to use GPT-4o via API directly with sound files. If there is a method, please let me know.
thank you very good
Phenomenal
Is there a way to create such an ai gf or person with an offline model? With fast response times etc that updates itself with the latest internet knowledge base when needed etc?
Creating an offline AI girlfriend or persona with fast response times and high-quality inference is challenging due to the significant hardware requirements.
The computational power needed for real-time processing and maintaining up-to-date knowledge is substantial, making it difficult to achieve the same performance as cloud-based solutions without high-end hardware.
However, you can keep everything local that should be private by using a local vector store for sensitive data. This hybrid approach allows you to balance performance and privacy by running core models offline and updating online as needed.
@@ai-for-devs thx. I don't have Internet access all the time so an offline alternative would be awesome. Also the one thing bothering me when using gpt4 is the long response times as it has to check the web. For an ai companion it doesn't necessarily need the most recent news to be socially useful.
Maybe I'm wrong but there seem to be more advantages for an offline ai person.
Faster responses as it doesn't have to check the web (also no queues), versatile use as it can be used anywhere (isn't reliant on constant Internet access), cost effective as there aren't monthly fees, secure as it runs locally, up to date (kinda) with most recent Internet updates integrateable at will, like once every month (topics adjustable to the ai persona), etc.
👍 men saknar Xai’s #Grok…
How could we say a phrase to end the conversation script?
You could add a condition like:
...
print(transcription.text)
if "goodbye" in transcription.text.strip().lower():
print("Goodbye detected, exiting loop.")
break
@@ai-for-devs Would I place this at the beginning of the while True: loop?
can we discuss the recent football match with the ai ?
Please do it and send me a screenshot 😂
@@ai-for-devs i mean, does the ai watch football ? so we can discuss football news with the ai
If you use whisper, you dont use the multimodal aspect of GPT 4o. It's not the real deal.
Please check the comment and the discussion in the previous comment of arianaponytail
+1, the title is misleading. I've been clickbaited.
very good! however, i get this error after the bot has created the output.mp3 on my first question, when i then ask a follow-up question, this error occurs. so it cannot change the output.mp3 once it has been created.
Traceback (most recent call last):
File "F:\BOTS\her-gpt4o\app.py", line 32, in
response.stream_to_file('output.mp3')
File "C:\Users\atzek\.conda\envs\her\lib\site-packages\typing_extensions.py", line 2636, in wrapper
return arg(*args, **kwargs)
File "C:\Users\atzek\.conda\envs\her\lib\site-packages\openai\_legacy_response.py", line 423, in stream_to_file
with open(file, mode="wb") as f:
PermissionError: [Errno 13] Permission denied: 'output.mp3'
To avoid this issue, you can create temporary files or change the filenames based on timestamps or an increment. This way, each response gets a unique file name, preventing conflicts.
@@ai-for-devs i'm not a coder :( how?
Can i find free gpt4o key? I want test my code just one time. 20dollar expensive for this😅
I'm guessing you have to be a paying customer?
Correct
$2.8 Billion in 2023 🤯🤯
And this will triple this year
Any AI boyfriend?
AI boyfriends? Absolutely! Just like AI girlfriends, you can create an AI boyfriend with the same tech. He’ll be attentive, always remember anniversaries, and never complain about watching romantic comedies.
My friend can i wire$$$$ you for a project consultation ? please help me to create a BRAZILIAN GIRLFRIEND, im a brazilian!!!