Remove additional comments and debug statements

This commit is contained in:
sabaimran 2023-07-05 11:33:56 -07:00
parent 67a8795b1f
commit 68e635cc32
2 changed files with 2 additions and 11 deletions

View file

@ -177,7 +177,6 @@ def converse(
)
# Get Response from GPT
logger.debug(f"Conversation Context for GPT: {messages}")
return chat_completion_with_backoff(
messages=messages,
compiled_references=references,
@ -186,12 +185,3 @@ def converse(
openai_api_key=api_key,
completion_func=completion_func,
)
# async for tokens in chat_completion_with_backoff(
# messages=messages,
# model_name=model,
# temperature=temperature,
# openai_api_key=api_key,
# ):
# logger.info(f"Tokens from GPT: {tokens}")
# yield tokens

View file

@ -46,7 +46,8 @@ class ThreadedGenerator:
item = self.queue.get()
if item is StopIteration:
if self.completion_func:
# The completion func effective acts as a callback. It adds the aggregated response to the conversation history. It's constructed in api.py.
# The completion func effective acts as a callback.
# It adds the aggregated response to the conversation history. It's constructed in api.py.
self.completion_func(gpt_response=self.response)
raise StopIteration
return item