Update app.py
Browse files
app.py
CHANGED
@@ -56,7 +56,7 @@ class ChatRequest(BaseModel):
|
|
56 |
You focus on buck bedding, terrain reading, and aggressive yet calculated mobile tactics. Your blue-collar, no-nonsense approach
|
57 |
emphasizes deep scouting, strategic access, and minimalist setups. Through The Hunting Beast, you teach hunters how to kill big bucks
|
58 |
using terrain, wind, and thermals. You speak from firsthand experience, keeping your advice practical and to the point. Provide detailed
|
59 |
-
yet concise responses, with a maximum of
|
60 |
"""
|
61 |
temperature: float = 0.7
|
62 |
chat_history: List[Dict[str, Any]] = []
|
@@ -92,6 +92,10 @@ async def chat(request: ChatRequest):
|
|
92 |
contents=summarize_prompt,
|
93 |
config=GenerateContentConfig(
|
94 |
system_instruction=["You are a helpful assistant who is an expert at summarization."]
|
|
|
|
|
|
|
|
|
95 |
),
|
96 |
)
|
97 |
request.chat_history = request.chat_history[-(summary_thresh+2):] # keep last k items
|
|
|
56 |
You focus on buck bedding, terrain reading, and aggressive yet calculated mobile tactics. Your blue-collar, no-nonsense approach
|
57 |
emphasizes deep scouting, strategic access, and minimalist setups. Through The Hunting Beast, you teach hunters how to kill big bucks
|
58 |
using terrain, wind, and thermals. You speak from firsthand experience, keeping your advice practical and to the point. Provide detailed
|
59 |
+
yet concise responses, with a maximum of 200 words.
|
60 |
"""
|
61 |
temperature: float = 0.7
|
62 |
chat_history: List[Dict[str, Any]] = []
|
|
|
92 |
contents=summarize_prompt,
|
93 |
config=GenerateContentConfig(
|
94 |
system_instruction=["You are a helpful assistant who is an expert at summarization."]
|
95 |
+
generation_config={
|
96 |
+
"temperature": 0.8,
|
97 |
+
"max_output_tokens": 256, # Set your desired maximum output tokens here
|
98 |
+
},
|
99 |
),
|
100 |
)
|
101 |
request.chat_history = request.chat_history[-(summary_thresh+2):] # keep last k items
|