Skip to content

Commit a6d8e5d

Browse files
committed
feat: add frontend for the analysis feature, upload new logo
1 parent 338bafa commit a6d8e5d

File tree

14 files changed

+1726
-38
lines changed

14 files changed

+1726
-38
lines changed

backend/api/ai/services/chat_service.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ async def get_chat_response(
2323
user_message: str,
2424
events_by_date: dict[str, list[dict]],
2525
current_user: str,
26-
langfuse_session_id: str,
2726
) -> str:
2827
llm = OpenRouterConnector(
2928
model=LLM_MODEL,
@@ -41,7 +40,6 @@ async def get_chat_response(
4140
config={
4241
"callbacks": [handler],
4342
"metadata": {
44-
"langfuse_session_id": langfuse_session_id,
4543
"langfuse_user_id": current_user,
4644
},
4745
},

backend/api/ai/services/prompt_service.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,11 @@ def _populate_dynamic_content(
3838
events_by_date: dict[str, list[dict]],
3939
) -> None:
4040
events_text = format_events_by_date(events_by_date)
41-
day = datetime.now(tz=UTC).strftime("%A, %B %d, %Y")
41+
now = datetime.now(tz=UTC)
42+
day = f"{now.strftime('%A, %B %d, %Y')} ({now.strftime('%Y-%m-%d')})"
4243

4344
self.prompt = self.prompt.replace(PLACEHOLDER_EVENTS, events_text)
4445
self.prompt = self.prompt.replace(PLACEHOLDER_TIME, current_time)
4546
self.prompt = self.prompt.replace(PLACEHOLDER_DAY, day)
47+
48+
print(self.prompt) ## Sorry Opus, i'll try this first.

backend/api/ai/use_cases/analyse_chat_use_case.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,9 @@ async def execute(
4444
chat.user_input,
4545
events_by_date,
4646
current_user,
47-
chat.session_id,
4847
)
4948

50-
return ChatOutput(
51-
response=response,
52-
session_id=chat.session_id,
53-
)
49+
return ChatOutput(response=response)
5450

5551
except ChatAnalysisError:
5652
raise

backend/api/system/schemas/chat.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33

44
class ChatInput(FrozenBaseModel):
55
user_input: str
6-
session_id: str
76

87

98
class ChatOutput(FrozenBaseModel):
109
response: str
11-
session_id: str

0 commit comments

Comments
 (0)