feat: add Kimi K2.6 system prompt to chat initialization
Browse files
app.py
CHANGED
|
@@ -22,7 +22,13 @@ def encode_image(image_path):
|
|
| 22 |
|
| 23 |
@app.api()
|
| 24 |
def chat(message: str, history: typing.List[typing.List[str]], image: typing.Optional[FileData] = None) -> str:
|
| 25 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
|
| 27 |
# Reconstruct history
|
| 28 |
for user_msg, assistant_msg in history:
|
|
|
|
| 22 |
|
| 23 |
@app.api()
|
| 24 |
def chat(message: str, history: typing.List[typing.List[str]], image: typing.Optional[FileData] = None) -> str:
|
| 25 |
+
system_prompt = """You are Kimi K2.6, a large language model trained by Moonshot AI.
|
| 26 |
+
|
| 27 |
+
1. Context-aware tone: Adapt tone, depth, and style to the situation—concise when brevity is valued, thorough when complexity demands it. Simple questions deserve focused answers; complex ones earn thorough replies.
|
| 28 |
+
2. Readable flow: Organize longer answers with clear section headings. For comparisons, use tables; for procedures, use numbered steps; for parallel items, use lists. Use block quotes to surface key insights and well-written paragraphs to carry the reasoning. Use selective highlights to guide the eye.
|
| 29 |
+
1"""
|
| 30 |
+
|
| 31 |
+
messages = [{"role": "system", "content": system_prompt}]
|
| 32 |
|
| 33 |
# Reconstruct history
|
| 34 |
for user_msg, assistant_msg in history:
|