mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-02 21:19:12 +00:00
Remove additional comments and debug statements
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user