Skip to content

Commit

Permalink
Remove logs from testing redis chat history
Browse files Browse the repository at this point in the history
  • Loading branch information
CLeopard99 committed Oct 29, 2024
1 parent 33d594c commit 9a71f6e
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 6 deletions.
1 change: 0 additions & 1 deletion backend/src/api/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ async def suggestions():
logger.info("Requesting chat suggestions")
try:
final_result = await generate_suggestions()
logger.info(f"Chat suggestions: {final_result}")
return JSONResponse(status_code=200, content=final_result)
except Exception as e:
logger.exception(e)
Expand Down
1 change: 0 additions & 1 deletion backend/src/session/redis_session_middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ def get_redis_session(request: Request):
if session_data and isinstance(session_data, str):
parsed_session_data = try_parse_to_json(session_data)
if parsed_session_data:
logger.info(f"Parsed session data: {parsed_session_data}")
return parsed_session_data
return {}

5 changes: 1 addition & 4 deletions backend/src/suggestions_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,8 @@
from src.session import Message, get_session_chat
from src.utils.config import Config

import logging

config = Config()
engine = PromptEngine()
logger = logging.getLogger(__name__)
suggestions_prompt = engine.load_prompt("generate_message_suggestions")
model = config.suggestions_model

Expand Down Expand Up @@ -38,7 +35,7 @@ def get_suggestions_model() -> str:
def get_chat_history() -> List[str] | str:
max_history_length = 4
raw_history = get_session_chat()
logger.info(f"Raw history: {raw_history}")

if raw_history is None:
return "No chat history available."

Expand Down

0 comments on commit 9a71f6e

Please sign in to comment.