mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-27 17:35:07 +01:00
Remove additional comments and debug statements
This commit is contained in:
parent
67a8795b1f
commit
68e635cc32
2 changed files with 2 additions and 11 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue