From 68e635cc328aebc8a3364e66e3530663090dfc4d Mon Sep 17 00:00:00 2001 From: sabaimran Date: Wed, 5 Jul 2023 11:33:56 -0700 Subject: [PATCH] Remove additional comments and debug statements --- src/khoj/processor/conversation/gpt.py | 10 ---------- src/khoj/processor/conversation/utils.py | 3 ++- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/src/khoj/processor/conversation/gpt.py b/src/khoj/processor/conversation/gpt.py index 14dcf87b..e1b54303 100644 --- a/src/khoj/processor/conversation/gpt.py +++ b/src/khoj/processor/conversation/gpt.py @@ -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 diff --git a/src/khoj/processor/conversation/utils.py b/src/khoj/processor/conversation/utils.py index 6f6f1b70..cab4ef19 100644 --- a/src/khoj/processor/conversation/utils.py +++ b/src/khoj/processor/conversation/utils.py @@ -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