Skip to content

Commit

Permalink
multion fix
Browse files Browse the repository at this point in the history
  • Loading branch information
josancamon19 committed Sep 3, 2024
1 parent 36f2ef4 commit 5f88042
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions plugins/example/_multion/router.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,16 +162,17 @@ async def initiate_process_transcript(data: RealtimePluginRequest, uid: str = Qu
if not user_id:
raise HTTPException(status_code=400, detail="Invalid UID or USERID not found.")

session_id = 'multion-' + data.session_id
db.clean_all_transcripts_except(uid, session_id)
transcript: List[TranscriptSegment] = db.append_segment_to_transcript(uid, session_id, data.segments)
# session_id = 'multion-' + data.session_id
# db.clean_all_transcripts_except(uid, session_id)
# transcript: List[TranscriptSegment] = db.append_segment_to_transcript(uid, session_id, data.segments)
transcript = data.segments

try:
books = retrieve_books_to_buy(transcript)
if not books:
return {'message': ''}
else:
db.remove_transcript(uid, data.session_id)
# else:
# db.remove_transcript(uid, data.session_id)

result = await asyncio.wait_for(call_multion(books, user_id), timeout=120)
except asyncio.TimeoutError:
Expand Down

0 comments on commit 5f88042

Please sign in to comment.