Skip to content

Commit 4eeb6b1

Browse files
committed
🚸 User Experience Improvements
1 parent ca05c6d commit 4eeb6b1

File tree

5 files changed

+232
-203
lines changed

5 files changed

+232
-203
lines changed

.streamlit/config.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[theme]
22
base="dark"
33
primaryColor="#00ADB5"
4-
backgroundColor="#222831"
5-
secondaryBackgroundColor="#393E46"
6-
textColor="#EEEEEE"
4+
backgroundColor="#1e1e1e"
5+
secondaryBackgroundColor="#333333"
6+
textColor="#64ffda"
77
font="sans serif"

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ psycopg2-binary
1111
sqlalchemy
1212
# API and configuration
1313
python-dotenv
14-
openai
14+
google-generativeai

src/api/LLM_Config.py

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -19,34 +19,16 @@ def get_completion_from_messages(
1919
temperature: float = 0.3,
2020
) -> str:
2121
try:
22-
# Combine system and user messages
2322
combined_message = f"{system_message}\n\nUser Query: {user_message}"
24-
print("=== INPUT ===")
25-
print(f"Combined Message:\n{combined_message}")
26-
print(f"Temperature: {temperature}")
27-
23+
# print(f"Combined Message:\n{combined_message}")
2824
model = genai.GenerativeModel(GEMINI_MODEL)
2925
response = model.generate_content(
3026
contents=combined_message,
3127
generation_config={"temperature": temperature}
3228
)
33-
34-
# Log raw response
35-
print("\n=== RAW OUTPUT ===")
36-
print(f"Response Object: {response}")
37-
38-
# Ensure text is a string and clean it
3929
text = response.text if isinstance(response.text, str) else str(response.text)
4030
clean_text = re.sub(r'```json\n|\n```', '', text)
41-
42-
# Log cleaned text
43-
print("\n=== CLEANED OUTPUT ===")
44-
print(f"Cleaned Text:\n{clean_text}")
45-
4631
return clean_text
47-
4832
except Exception as e:
4933
error_msg = f"Error generating response: {str(e)}"
50-
print("\n=== ERROR ===")
51-
print(error_msg)
5234
return error_msg

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy