Skip to content

Commit

Permalink
test with warning
Browse files Browse the repository at this point in the history
  • Loading branch information
marvinbuss committed Aug 26, 2024
1 parent 9f02c6c commit 1a53855
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions code/backend/llm/assisstant.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def create_thread(self) -> str:
RETURNS (str): Thread id of the newly created thread.
"""
thread = self.client.beta.threads.create()
logger.debug(f"Created thread with thread id: '{thread.id}'")
logger.warning(f"Created thread with thread id: '{thread.id}'")
return thread.id

def send_message(self, message: str, thread_id: str) -> str | None:
Expand All @@ -60,7 +60,7 @@ def send_message(self, message: str, thread_id: str) -> str | None:
thread_id (str): The thread id to which the message should be sent to the assistant.
RETURNS (str): The response from the assistant is being returned.
"""
logger.debug(
logger.warning(
f"Adding message to thread with thread id: '{thread_id}' - Mesage: '{message}'"
)
if thread_id is None:
Expand Down Expand Up @@ -95,7 +95,7 @@ def __wait_for_run(self, run: Run, thread_id: str) -> Run:
thread_id=thread_id, run_id=run.id
)
status = run.status
logger.debug(f"Status of run '{run.id}' in thread '{thread_id}': {status}")
logger.warning(f"Status of run '{run.id}' in thread '{thread_id}': {status}")
return run

def __check_for_tools(self, run: Run, thread_id: str) -> Run:
Expand Down Expand Up @@ -134,7 +134,7 @@ def __get_assisstant_response(self, thread_id: str) -> str:
first_message_text = message_data_0_content_0.get("text", {"value": ""}).get(
"value"
)
logger.debug(
logger.warning(
f"Response from Assistant in thread '{thread_id}': {first_message_text}"
)

Expand Down

0 comments on commit 1a53855

Please sign in to comment.