Syntax highlighting fixes, autocomplete overhaul, tui changes
This commit is contained in:
@@ -353,7 +353,7 @@ class HandbookService:
|
||||
{"role": "user", "content": prompt},
|
||||
],
|
||||
"temperature": 0.2,
|
||||
"max_tokens": 900,
|
||||
"max_tokens": max(config.llm_max_tokens, 4096),
|
||||
}
|
||||
|
||||
headers = {"Content-Type": "application/json"}
|
||||
@@ -366,12 +366,11 @@ class HandbookService:
|
||||
response.raise_for_status()
|
||||
data = response.json()
|
||||
|
||||
example_md = (
|
||||
data.get("choices", [{}])[0]
|
||||
.get("message", {})
|
||||
.get("content", "")
|
||||
.strip()
|
||||
)
|
||||
msg_obj = data.get("choices", [{}])[0].get("message", {})
|
||||
example_md = msg_obj.get("content") or ""
|
||||
if not example_md.strip() and msg_obj.get("reasoning_content"):
|
||||
example_md = msg_obj.get("reasoning_content", "")
|
||||
example_md = example_md.strip()
|
||||
|
||||
return {
|
||||
"status": "success",
|
||||
|
||||
Reference in New Issue
Block a user