Skip to content

Commit

Permalink
Kleiner Fehler bei user.registered event
Browse files Browse the repository at this point in the history
  • Loading branch information
TechPrototyper committed Apr 11, 2024
1 parent cfc48f4 commit e3dcb43
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions API/azure_openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,18 +125,18 @@ async def get_or_create_thread(self, user_email: str) -> str:
thread = await self.async_api_call(self.client.beta.threads.create)
thread_id = thread.id
await self.threads.set_id(user_email, thread_id)
# After we're done, we'll let the world know that a user has registered...
user_details = {"email": user_email, "thread_id": thread_id}
async with EventGridPublisher() as publisher:
await publisher.send_event("user.registered", user_details)

except Exception as e:
logging.error(f"Fehler bei der Thread-Erstellung oder -Speicherung: {e}")
raise
except Exception as e:
logging.error(f"Ein unbekannter Fehler beim Zugriff auf die Thread-Historie ist aufgetreten: {e}")
raise

# After we're done, we'll let the world know that a user has registered...
user_details = {"email": user_email, "thread_id": thread_id}
async with EventGridPublisher() as publisher:
await publisher.send_event("user.registered", user_details)

# ... and return the Thread-Id for further processing
return thread_id

Expand Down

0 comments on commit e3dcb43

Please sign in to comment.