anveesa 0.3.9 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Cargo.lock +1 -1
- package/Cargo.toml +1 -1
- package/package.json +1 -1
- package/src/provider/openai_compatible.rs +8 -8
package/Cargo.lock
CHANGED
package/Cargo.toml
CHANGED
package/package.json
CHANGED
|
@@ -485,24 +485,24 @@ fn parse_tool_round_limit(value: Option<&str>) -> usize {
|
|
|
485
485
|
|
|
486
486
|
fn tool_limit_message(max_tool_rounds: usize) -> Value {
|
|
487
487
|
json!({
|
|
488
|
-
"role": "
|
|
488
|
+
"role": "user",
|
|
489
489
|
"content": format!(
|
|
490
|
-
"Anveesa has already run {max_tool_rounds} tool rounds for this answer. Do not call tools again. Use the tool results already provided to produce the best final answer. If the requested work is not complete, say exactly what remains."
|
|
490
|
+
"[system: Anveesa has already run {max_tool_rounds} tool rounds for this answer. Do not call tools again. Use the tool results already provided to produce the best final answer. If the requested work is not complete, say exactly what remains.]"
|
|
491
491
|
)
|
|
492
492
|
})
|
|
493
493
|
}
|
|
494
494
|
|
|
495
495
|
fn length_continuation_message() -> Value {
|
|
496
496
|
json!({
|
|
497
|
-
"role": "
|
|
498
|
-
"content": "Your previous response was cut off because it reached the output token limit. Continue from exactly where you left off. Do not repeat text you already produced and do not restart the answer. If you were in the middle of a tool call, re-issue that complete tool call now."
|
|
497
|
+
"role": "user",
|
|
498
|
+
"content": "[system: Your previous response was cut off because it reached the output token limit. Continue from exactly where you left off. Do not repeat text you already produced and do not restart the answer. If you were in the middle of a tool call, re-issue that complete tool call now.]"
|
|
499
499
|
})
|
|
500
500
|
}
|
|
501
501
|
|
|
502
502
|
fn tool_intent_reprompt_message() -> Value {
|
|
503
503
|
json!({
|
|
504
|
-
"role": "
|
|
505
|
-
"content": "Your previous message said you would inspect/read/check the workspace, but it did not call any tool or provide a final answer. Do not narrate future tool use. If you need information, call the relevant Anveesa tools now. Otherwise, answer the user directly."
|
|
504
|
+
"role": "user",
|
|
505
|
+
"content": "[system: Your previous message said you would inspect/read/check the workspace, but it did not call any tool or provide a final answer. Do not narrate future tool use. If you need information, call the relevant Anveesa tools now. Otherwise, answer the user directly.]"
|
|
506
506
|
})
|
|
507
507
|
}
|
|
508
508
|
|
|
@@ -1136,7 +1136,7 @@ mod tests {
|
|
|
1136
1136
|
#[test]
|
|
1137
1137
|
fn length_continuation_message_asks_to_resume_without_repeating() {
|
|
1138
1138
|
let message = length_continuation_message();
|
|
1139
|
-
assert_eq!(message["role"], json!("
|
|
1139
|
+
assert_eq!(message["role"], json!("user"));
|
|
1140
1140
|
let content = message["content"].as_str().unwrap();
|
|
1141
1141
|
assert!(content.contains("cut off"));
|
|
1142
1142
|
assert!(content.contains("Do not repeat"));
|
|
@@ -1193,7 +1193,7 @@ mod tests {
|
|
|
1193
1193
|
#[test]
|
|
1194
1194
|
fn tool_limit_message_forces_final_answer() {
|
|
1195
1195
|
let message = tool_limit_message(3);
|
|
1196
|
-
assert_eq!(message["role"], json!("
|
|
1196
|
+
assert_eq!(message["role"], json!("user"));
|
|
1197
1197
|
assert!(
|
|
1198
1198
|
message["content"]
|
|
1199
1199
|
.as_str()
|