-
Notifications
You must be signed in to change notification settings - Fork 0
OpenAI Audio implementation #1133
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
base: testing
Are you sure you want to change the base?
Conversation
2ff5ab5 to
497cc38
Compare
harshhsahu
left a comment
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.
history me user_urls me history
{
url, type}
| result = await image(data_to_send) | ||
| return result | ||
| if type == 'audio': | ||
| loop = asyncio.get_event_loop() |
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.
loop kyu bna rhe h?
| type = data_to_send.get("body",{}).get('configuration',{}).get('type') | ||
| if type == 'embedding': | ||
| loop = asyncio.get_event_loop() | ||
| result = await loop.run_in_executor(executor, lambda: asyncio.run(embedding(data_to_send))) |
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.
yaha bhe kyu looop me run krna h openai aynsc chalta h
| self.function_time_logs = params.get('function_time_logs') | ||
| self.files = params.get('files') or [] | ||
| self.file_data = params.get('file_data') | ||
| self.audio_file = params.get('audio_file') |
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.
file_data, file check kro and isme hi audio send krne ka option hona chahiye.
and cmt dal dena ki file and file_data kya h
|
|
||
| async def OpenAIAudioModel(configuration, apiKey, execution_time_logs, timer, audio_file): | ||
| try: | ||
| openai_config = AsyncOpenAI(api_key=apiKey) |
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.
rearrage the code
| "file_data" : body.get('file_data') or body.get('video_data') or {}, | ||
| "audio_file" : body.get('audio_file') or {}, |
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.
.
added audio model of openai