Lot 6 : parité de la boucle d'un tour avec le Go (journaux de référence)

internal/loki/parity_test.go rejoue 19 scénarios dans runChatTools contre
un faux moteur aux réponses scriptées, outils aux résultats fixés
(execToolHook, nil en service) : réponse simple, raisonnement, outils
seuls et en parallèle, appel répété, arguments illisibles, outil inconnu,
budget dépassé, « pensé sans agir » une et deux fois, pensée en ligne,
échantillonnage et intensité, raisonnement coupé, 500 une et deux fois,
erreur du moteur, appel d'outil écrit en texte, API externe, historique
déjà outillé. Les corps envoyés au moteur, les événements d'affichage
(texte regroupé, mesures ignorées), l'historique ajouté et l'erreur sont
rangés dans rust/loki-rs/tests/parity/*.json ; le test Go échoue si la
boucle ne les produit plus (LOKI_PARITY_UPDATE=1 pour régénérer).

rust/loki-rs/tests/parity.rs rejoue les mêmes scénarios dans
chat::turn::run_turn et retrouve les 19 journaux à l'identique.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016tcGfJWefW5kUGoC2wL8cv
This commit is contained in:
Claude committed 2026-10-15 11:32:11 +00:00
1 parent ad46bb69a6
commit bc388d7a01
22 files changed
+6250 -1

No files matched your search

+284
View File
@@ -0,0 +1,284 @@
//! Parité de la boucle d'un tour avec le Go (lot 6).
//!
//! `tests/parity/*.json` : journaux de référence produits par la boucle Go
//! (`internal/loki/parity_test.go`, régénérés par
//! `LOKI_PARITY_UPDATE=1 go test ./internal/loki -run TestPariteJournaux`).
//! Chaque scénario est rejoué ici dans `chat::turn::run_turn`, sur un hôte qui
//! sert les mêmes réponses du moteur et les mêmes résultats d'outils. Doivent
//! se retrouver à l'identique : les corps envoyés au moteur (le cache de
//! préfixe en dépend), les événements d'affichage (texte regroupé, mesures
//! ignorées), les messages ajoutés à l'historique et l'erreur.
use std::collections::{HashMap, VecDeque};
use std::path::PathBuf;
use std::sync::{Arc, Mutex};
use bytes::Bytes;
use serde::Deserialize;
use serde_json::{Map, Value, json};
use loki_rs::chat::compact::CompactConfig;
use loki_rs::chat::stream::RetryPatterns;
use loki_rs::chat::turn::{
Cancel, CompactPhase, Reply, SendError, ToolOutcome, TurnConfig, TurnHost, run_turn,
};
use loki_rs::chat::types::{Message, StreamEvent, Tool};
use loki_rs::chat::wire::{
ChatEndpoint, EchoRefusals, EffortFallbacks, echo_policy_for, resolve_chat_endpoint,
turn_reasoning,
};
#[derive(Deserialize)]
struct ReplyFx {
status: u16,
lines: Vec<String>,
}
#[derive(Deserialize)]
struct Expect {
requests: Vec<Value>,
events: Vec<Value>,
extra: Value,
err: String,
}
#[derive(Deserialize)]
struct Fixture {
name: String,
cfg: HashMap<String, String>,
messages: Vec<Message>,
tools: Vec<Tool>,
temperature: f64,
replies: Vec<ReplyFx>,
tool_results: HashMap<String, String>,
expect: Expect,
}
/// Hôte du rejeu : le moteur répond selon le script, les outils selon la
/// table du scénario — exactement ce que voit la boucle Go.
struct ParityHost {
replies: Mutex<VecDeque<ReplyFx>>,
tool_results: HashMap<String, String>,
requests: Mutex<Vec<Value>>,
}
impl TurnHost for ParityHost {
async fn send(&self, _ep: &ChatEndpoint, body: Vec<u8>) -> Result<Reply, SendError> {
self.requests
.lock()
.unwrap()
.push(serde_json::from_slice(&body).expect("corps JSON"));
let r = self
.replies
.lock()
.unwrap()
.pop_front()
.expect("requête non scriptée");
let chunks: Vec<Result<Bytes, String>> = r
.lines
.into_iter()
.map(|l| Ok(Bytes::from(format!("{l}\n\n"))))
.collect();
Ok(Reply {
status: r.status,
body: Box::pin(futures_util::stream::iter(chunks)),
})
}
async fn exec_tool(&self, name: &str, _args: &Map<String, Value>, _label: &str) -> ToolOutcome {
ToolOutcome {
result: self
.tool_results
.get(name)
.cloned()
.unwrap_or_else(|| format!("[erreur] outil inconnu : {name}")),
..Default::default()
}
}
fn save_tool_result(&self, _result: &str) -> String {
String::new()
}
async fn compact(&self, _phase: CompactPhase, _msgs: &[Message]) -> Option<Vec<Message>> {
None
}
fn drain_queued(&self) -> Vec<Message> {
Vec::new()
}
fn image_data_url(&self, _r: &str) -> Option<String> {
None
}
fn effort_remember(&self, _want: &str, _got: &str) {}
fn echo_refuse(&self, _model: &str) {}
}
/// Forme comparable d'un événement — `parityEvent` du Go (`None` : mesures).
fn event(ev: &StreamEvent) -> Option<Value> {
Some(match ev {
StreamEvent::Content(s) if !s.is_empty() => json!({ "content": s }),
StreamEvent::Reasoning(s) if !s.is_empty() => json!({ "reasoning": s }),
StreamEvent::Content(_) | StreamEvent::Reasoning(_) | StreamEvent::Stats(_) => {
return None;
}
StreamEvent::ToolUsed(t) => {
let mut m = Map::new();
m.insert("name".into(), json!(t.name));
let mut put = |k: &str, v: Value, keep: bool| {
if keep {
m.insert(k.into(), v);
}
};
put("label", json!(t.label), !t.label.is_empty());
put("result", json!(t.result), !t.result.is_empty());
put("done", json!(true), t.done);
put("typing", json!(true), t.typing);
put("body", json!(t.body), !t.body.is_empty());
put("body_tail", json!(true), t.body_tail);
put("body_lines", json!(t.body_lines), t.body_lines != 0);
put("diff", json!(t.diff), !t.diff.is_empty());
put("added", json!(t.added), t.added != 0);
put("removed", json!(t.removed), t.removed != 0);
put("image", json!(t.image), !t.image.is_empty());
put("shot", json!(t.shot), !t.shot.is_empty());
put("result_chars", json!(t.result_chars), t.result_chars != 0);
put("result_id", json!(t.result_id), !t.result_id.is_empty());
json!({ "tool_used": m })
}
StreamEvent::Ask(a) => json!({ "ask": a }),
StreamEvent::Err(e) => json!({ "err": e }),
StreamEvent::DropReasoning => json!({ "drop_reasoning": true }),
StreamEvent::Compacting(b) => json!({ "compacting": b }),
StreamEvent::NewHistory(h) => json!({ "new_history": h }),
StreamEvent::Echo(e) => json!({ "echo": { "text": e.text, "model": e.model } }),
})
}
/// Fragments de texte consécutifs regroupés — `parityMerge` du Go.
fn merge(evs: Vec<Value>) -> Vec<Value> {
let mut out: Vec<Value> = Vec::new();
for e in evs {
if let Some(last) = out.last_mut() {
let (lo, eo) = (last.as_object().unwrap(), e.as_object().unwrap());
if lo.len() == 1 && eo.len() == 1 {
let k = ["content", "reasoning"].into_iter().find(|k| {
lo.get(*k).is_some_and(Value::is_string)
&& eo.get(*k).is_some_and(Value::is_string)
});
if let Some(k) = k {
let s = format!("{}{}", lo[k].as_str().unwrap(), eo[k].as_str().unwrap());
*last = json!({ k: s });
continue;
}
}
}
out.push(e);
}
out
}
async fn replay(fx: Fixture) -> Result<(), String> {
let cfg = fx.cfg;
let refusals = EchoRefusals::default();
let echo = echo_policy_for(&cfg, &refusals, None);
let tc = TurnConfig {
ep: resolve_chat_endpoint(&cfg, ""),
tools: fx.tools,
temperature: fx.temperature,
code: false,
reasoning: turn_reasoning(&cfg, &EffortFallbacks::default()),
compact: CompactConfig::from_config(&cfg, echo.clone()),
echo,
patterns: RetryPatterns::builtin(),
cfg,
};
let host = ParityHost {
replies: Mutex::new(fx.replies.into()),
tool_results: fx.tool_results,
requests: Mutex::new(Vec::new()),
};
let evs = Arc::new(Mutex::new(Vec::new()));
let sink = evs.clone();
let res = run_turn(&host, &tc, fx.messages, &Cancel::never(), &mut |ev| {
if let Some(e) = event(&ev) {
sink.lock().unwrap().push(e);
}
true
})
.await;
let mut diffs = Vec::new();
let requests = host.requests.into_inner().unwrap();
if requests.len() != fx.expect.requests.len() {
diffs.push(format!(
"requêtes : {} envoyée(s), {} attendue(s)",
requests.len(),
fx.expect.requests.len()
));
}
for (i, (got, want)) in requests.iter().zip(&fx.expect.requests).enumerate() {
if got != want {
diffs.push(format!(
"requête {} :\n obtenu {}\n attendu {}",
i + 1,
got,
want
));
}
}
let events = merge(std::mem::take(&mut *evs.lock().unwrap()));
if events != fx.expect.events {
diffs.push(format!(
"événements :\n obtenu {}\n attendu {}",
Value::Array(events),
Value::Array(fx.expect.events)
));
}
let extra = serde_json::to_value(&res.extra).unwrap();
if extra != fx.expect.extra {
diffs.push(format!(
"historique :\n obtenu {extra}\n attendu {}",
fx.expect.extra
));
}
let err = res.err.unwrap_or_default();
if err != fx.expect.err {
diffs.push(format!("erreur : {err:?}, attendu {:?}", fx.expect.err));
}
if diffs.is_empty() {
Ok(())
} else {
Err(format!("{} :\n{}", fx.name, diffs.join("\n")))
}
}
#[tokio::test]
async fn journaux_du_go() {
let dir = PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("tests/parity");
let mut paths: Vec<PathBuf> = std::fs::read_dir(&dir)
.expect("tests/parity")
.map(|e| e.unwrap().path())
.filter(|p| p.extension().is_some_and(|x| x == "json"))
.collect();
paths.sort();
assert!(!paths.is_empty(), "aucun journal de référence");
let mut failures = Vec::new();
for p in &paths {
let fx: Fixture = serde_json::from_slice(&std::fs::read(p).unwrap())
.unwrap_or_else(|e| panic!("{} illisible : {e}", p.display()));
if let Err(e) = replay(fx).await {
failures.push(e);
}
}
assert!(
failures.is_empty(),
"{} scénario(s) sur {} divergent du Go :\n\n{}",
failures.len(),
paths.len(),
failures.join("\n\n")
);
}
+309
View File
@@ -0,0 +1,309 @@
{
"name": "api_externe",
"cfg": {
"EXTERNAL": "1",
"EXTERNAL_MODEL": "gpt-x",
"EXTERNAL_URL": "{{URL}}"
},
"messages": [
{
"role": "system",
"content": "Tu es Loki."
},
{
"role": "user",
"content": "Lis a.txt"
}
],
"tools": [
{
"type": "function",
"function": {
"name": "read",
"description": "Read a file with 1-indexed line numbers (offset/limit for long files). ALWAYS use this instead of cat/type: output is bounded and reading a file is REQUIRED before you may edit or overwrite it.",
"parameters": {
"properties": {
"file": {
"description": "Path (relative to the working folder)",
"type": "string"
},
"limit": {
"description": "Lines (default 400, max 1000)",
"type": "integer"
},
"offset": {
"description": "Start line (default 1)",
"type": "integer"
}
},
"required": [
"file"
],
"type": "object"
}
}
},
{
"type": "function",
"function": {
"name": "bash",
"description": "Run a shell command (bash syntax) and return stdout, stderr and exit code: inspect the system, read files and logs, run scripts. To CREATE or REWRITE a file use write instead — never echo/cat/python -c. Avoid destructive commands unless asked.",
"parameters": {
"properties": {
"command": {
"description": "The command",
"type": "string"
},
"timeout": {
"description": "Timeout s (default 30, max 300)",
"type": "integer"
}
},
"required": [
"command"
],
"type": "object"
}
}
}
],
"temperature": 0.7,
"replies": [
{
"status": 200,
"lines": [
"data: {\"choices\":[{\"delta\":{\"reasoning_content\":\"Je lis.\"}}]}",
"data: {\"choices\":[{\"delta\":{\"tool_calls\":[{\"function\":{\"arguments\":\"{\\\"file\\\":\\\"a.txt\\\"}\",\"name\":\"read\"},\"id\":\"c1\",\"index\":0,\"type\":\"function\"}]}}]}",
"data: {\"choices\":[{\"delta\":{},\"finish_reason\":\"tool_calls\"}],\"usage\":{\"completion_tokens\":5,\"prompt_tokens\":100}}",
"data: [DONE]"
]
},
{
"status": 200,
"lines": [
"data: {\"choices\":[{\"delta\":{\"content\":\"Deux lignes.\"}}]}",
"data: {\"choices\":[{\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":{\"completion_tokens\":5,\"prompt_tokens\":100}}",
"data: [DONE]"
]
}
],
"tool_results": {
"bash": "a.txt\nb.txt",
"read": "ligne 1\nligne 2"
},
"expect": {
"requests": [
{
"messages": [
{
"content": "Tu es Loki.",
"role": "system"
},
{
"content": "Lis a.txt",
"role": "user"
}
],
"model": "gpt-x",
"parallel_tool_calls": false,
"stream": true,
"stream_options": {
"include_usage": true
},
"temperature": 0.7,
"tools": [
{
"function": {
"description": "Read a file with 1-indexed line numbers (offset/limit for long files). ALWAYS use this instead of cat/type: output is bounded and reading a file is REQUIRED before you may edit or overwrite it.",
"name": "read",
"parameters": {
"properties": {
"file": {
"description": "Path (relative to the working folder)",
"type": "string"
},
"limit": {
"description": "Lines (default 400, max 1000)",
"type": "integer"
},
"offset": {
"description": "Start line (default 1)",
"type": "integer"
}
},
"required": [
"file"
],
"type": "object"
}
},
"type": "function"
},
{
"function": {
"description": "Run a shell command (bash syntax) and return stdout, stderr and exit code: inspect the system, read files and logs, run scripts. To CREATE or REWRITE a file use write instead — never echo/cat/python -c. Avoid destructive commands unless asked.",
"name": "bash",
"parameters": {
"properties": {
"command": {
"description": "The command",
"type": "string"
},
"timeout": {
"description": "Timeout s (default 30, max 300)",
"type": "integer"
}
},
"required": [
"command"
],
"type": "object"
}
},
"type": "function"
}
]
},
{
"messages": [
{
"content": "Tu es Loki.",
"role": "system"
},
{
"content": "Lis a.txt",
"role": "user"
},
{
"role": "assistant",
"tool_calls": [
{
"function": {
"arguments": "{\"file\":\"a.txt\"}",
"name": "read"
},
"id": "c1",
"type": "function"
}
]
},
{
"content": "ligne 1\nligne 2",
"role": "tool",
"tool_call_id": "c1"
}
],
"model": "gpt-x",
"parallel_tool_calls": false,
"stream": true,
"stream_options": {
"include_usage": true
},
"temperature": 0.7,
"tools": [
{
"function": {
"description": "Read a file with 1-indexed line numbers (offset/limit for long files). ALWAYS use this instead of cat/type: output is bounded and reading a file is REQUIRED before you may edit or overwrite it.",
"name": "read",
"parameters": {
"properties": {
"file": {
"description": "Path (relative to the working folder)",
"type": "string"
},
"limit": {
"description": "Lines (default 400, max 1000)",
"type": "integer"
},
"offset": {
"description": "Start line (default 1)",
"type": "integer"
}
},
"required": [
"file"
],
"type": "object"
}
},
"type": "function"
},
{
"function": {
"description": "Run a shell command (bash syntax) and return stdout, stderr and exit code: inspect the system, read files and logs, run scripts. To CREATE or REWRITE a file use write instead — never echo/cat/python -c. Avoid destructive commands unless asked.",
"name": "bash",
"parameters": {
"properties": {
"command": {
"description": "The command",
"type": "string"
},
"timeout": {
"description": "Timeout s (default 30, max 300)",
"type": "integer"
}
},
"required": [
"command"
],
"type": "object"
}
},
"type": "function"
}
]
}
],
"events": [
{
"reasoning": "Je lis."
},
{
"tool_used": {
"label": "a.txt",
"name": "read",
"typing": true
}
},
{
"tool_used": {
"label": "a.txt",
"name": "read"
}
},
{
"tool_used": {
"done": true,
"label": "a.txt",
"name": "read",
"result": "ligne 1\nligne 2",
"result_chars": 15
}
},
{
"content": "Deux lignes."
}
],
"extra": [
{
"role": "assistant",
"tool_calls": [
{
"id": "c1",
"type": "function",
"function": {
"name": "read",
"arguments": "{\"file\":\"a.txt\"}"
}
}
]
},
{
"role": "tool",
"content": "ligne 1\nligne 2",
"tool_call_id": "c1"
}
],
"err": ""
}
}
+456
View File
@@ -0,0 +1,456 @@
{
"name": "appel_repete",
"cfg": {},
"messages": [
{
"role": "system",
"content": "Tu es Loki."
},
{
"role": "user",
"content": "Lis a.txt"
}
],
"tools": [
{
"type": "function",
"function": {
"name": "read",
"description": "Read a file with 1-indexed line numbers (offset/limit for long files). ALWAYS use this instead of cat/type: output is bounded and reading a file is REQUIRED before you may edit or overwrite it.",
"parameters": {
"properties": {
"file": {
"description": "Path (relative to the working folder)",
"type": "string"
},
"limit": {
"description": "Lines (default 400, max 1000)",
"type": "integer"
},
"offset": {
"description": "Start line (default 1)",
"type": "integer"
}
},
"required": [
"file"
],
"type": "object"
}
}
},
{
"type": "function",
"function": {
"name": "bash",
"description": "Run a shell command (bash syntax) and return stdout, stderr and exit code: inspect the system, read files and logs, run scripts. To CREATE or REWRITE a file use write instead — never echo/cat/python -c. Avoid destructive commands unless asked.",
"parameters": {
"properties": {
"command": {
"description": "The command",
"type": "string"
},
"timeout": {
"description": "Timeout s (default 30, max 300)",
"type": "integer"
}
},
"required": [
"command"
],
"type": "object"
}
}
}
],
"temperature": 0.7,
"replies": [
{
"status": 200,
"lines": [
"data: {\"choices\":[{\"delta\":{\"tool_calls\":[{\"function\":{\"arguments\":\"{\\\"file\\\":\\\"a.txt\\\"}\",\"name\":\"read\"},\"id\":\"c1\",\"index\":0,\"type\":\"function\"}]}}]}",
"data: {\"choices\":[{\"delta\":{},\"finish_reason\":\"tool_calls\"}],\"usage\":{\"completion_tokens\":5,\"prompt_tokens\":100}}",
"data: [DONE]"
]
},
{
"status": 200,
"lines": [
"data: {\"choices\":[{\"delta\":{\"tool_calls\":[{\"function\":{\"arguments\":\"{\\\"file\\\":\\\"a.txt\\\"}\",\"name\":\"read\"},\"id\":\"c2\",\"index\":0,\"type\":\"function\"}]}}]}",
"data: {\"choices\":[{\"delta\":{},\"finish_reason\":\"tool_calls\"}],\"usage\":{\"completion_tokens\":5,\"prompt_tokens\":100}}",
"data: [DONE]"
]
},
{
"status": 200,
"lines": [
"data: {\"choices\":[{\"delta\":{\"content\":\"Toujours deux lignes.\"}}]}",
"data: {\"choices\":[{\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":{\"completion_tokens\":5,\"prompt_tokens\":100}}",
"data: [DONE]"
]
}
],
"tool_results": {
"bash": "a.txt\nb.txt",
"read": "ligne 1\nligne 2"
},
"expect": {
"requests": [
{
"messages": [
{
"content": "Tu es Loki.",
"role": "system"
},
{
"content": "Lis a.txt",
"role": "user"
}
],
"model": "loki",
"parallel_tool_calls": false,
"stream": true,
"stream_options": {
"include_usage": true
},
"temperature": 0.7,
"tools": [
{
"function": {
"description": "Read a file with 1-indexed line numbers (offset/limit for long files). ALWAYS use this instead of cat/type: output is bounded and reading a file is REQUIRED before you may edit or overwrite it.",
"name": "read",
"parameters": {
"properties": {
"file": {
"description": "Path (relative to the working folder)",
"type": "string"
},
"limit": {
"description": "Lines (default 400, max 1000)",
"type": "integer"
},
"offset": {
"description": "Start line (default 1)",
"type": "integer"
}
},
"required": [
"file"
],
"type": "object"
}
},
"type": "function"
},
{
"function": {
"description": "Run a shell command (bash syntax) and return stdout, stderr and exit code: inspect the system, read files and logs, run scripts. To CREATE or REWRITE a file use write instead — never echo/cat/python -c. Avoid destructive commands unless asked.",
"name": "bash",
"parameters": {
"properties": {
"command": {
"description": "The command",
"type": "string"
},
"timeout": {
"description": "Timeout s (default 30, max 300)",
"type": "integer"
}
},
"required": [
"command"
],
"type": "object"
}
},
"type": "function"
}
]
},
{
"messages": [
{
"content": "Tu es Loki.",
"role": "system"
},
{
"content": "Lis a.txt",
"role": "user"
},
{
"role": "assistant",
"tool_calls": [
{
"function": {
"arguments": "{\"file\":\"a.txt\"}",
"name": "read"
},
"id": "c1",
"type": "function"
}
]
},
{
"content": "ligne 1\nligne 2",
"role": "tool",
"tool_call_id": "c1"
}
],
"model": "loki",
"parallel_tool_calls": false,
"stream": true,
"stream_options": {
"include_usage": true
},
"temperature": 0.7,
"tools": [
{
"function": {
"description": "Read a file with 1-indexed line numbers (offset/limit for long files). ALWAYS use this instead of cat/type: output is bounded and reading a file is REQUIRED before you may edit or overwrite it.",
"name": "read",
"parameters": {
"properties": {
"file": {
"description": "Path (relative to the working folder)",
"type": "string"
},
"limit": {
"description": "Lines (default 400, max 1000)",
"type": "integer"
},
"offset": {
"description": "Start line (default 1)",
"type": "integer"
}
},
"required": [
"file"
],
"type": "object"
}
},
"type": "function"
},
{
"function": {
"description": "Run a shell command (bash syntax) and return stdout, stderr and exit code: inspect the system, read files and logs, run scripts. To CREATE or REWRITE a file use write instead — never echo/cat/python -c. Avoid destructive commands unless asked.",
"name": "bash",
"parameters": {
"properties": {
"command": {
"description": "The command",
"type": "string"
},
"timeout": {
"description": "Timeout s (default 30, max 300)",
"type": "integer"
}
},
"required": [
"command"
],
"type": "object"
}
},
"type": "function"
}
]
},
{
"messages": [
{
"content": "Tu es Loki.",
"role": "system"
},
{
"content": "Lis a.txt",
"role": "user"
},
{
"role": "assistant",
"tool_calls": [
{
"function": {
"arguments": "{\"file\":\"a.txt\"}",
"name": "read"
},
"id": "c1",
"type": "function"
}
]
},
{
"content": "ligne 1\nligne 2",
"role": "tool",
"tool_call_id": "c1"
},
{
"role": "assistant",
"tool_calls": [
{
"function": {
"arguments": "{\"file\":\"a.txt\"}",
"name": "read"
},
"id": "c2",
"type": "function"
}
]
},
{
"content": "[déjà fait] Appel identique déjà exécuté dans ce tour — non rejoué. Voici à nouveau son résultat ; ne le redemande pas une troisième fois.\n\nligne 1\nligne 2",
"role": "tool",
"tool_call_id": "c2"
}
],
"model": "loki",
"parallel_tool_calls": false,
"stream": true,
"stream_options": {
"include_usage": true
},
"temperature": 0.7,
"tools": [
{
"function": {
"description": "Read a file with 1-indexed line numbers (offset/limit for long files). ALWAYS use this instead of cat/type: output is bounded and reading a file is REQUIRED before you may edit or overwrite it.",
"name": "read",
"parameters": {
"properties": {
"file": {
"description": "Path (relative to the working folder)",
"type": "string"
},
"limit": {
"description": "Lines (default 400, max 1000)",
"type": "integer"
},
"offset": {
"description": "Start line (default 1)",
"type": "integer"
}
},
"required": [
"file"
],
"type": "object"
}
},
"type": "function"
},
{
"function": {
"description": "Run a shell command (bash syntax) and return stdout, stderr and exit code: inspect the system, read files and logs, run scripts. To CREATE or REWRITE a file use write instead — never echo/cat/python -c. Avoid destructive commands unless asked.",
"name": "bash",
"parameters": {
"properties": {
"command": {
"description": "The command",
"type": "string"
},
"timeout": {
"description": "Timeout s (default 30, max 300)",
"type": "integer"
}
},
"required": [
"command"
],
"type": "object"
}
},
"type": "function"
}
]
}
],
"events": [
{
"tool_used": {
"label": "a.txt",
"name": "read",
"typing": true
}
},
{
"tool_used": {
"label": "a.txt",
"name": "read"
}
},
{
"tool_used": {
"done": true,
"label": "a.txt",
"name": "read",
"result": "ligne 1\nligne 2",
"result_chars": 15
}
},
{
"tool_used": {
"label": "a.txt",
"name": "read",
"typing": true
}
},
{
"tool_used": {
"label": "a.txt",
"name": "read"
}
},
{
"tool_used": {
"done": true,
"label": "a.txt",
"name": "read",
"result": "[déjà fait] Appel identique déjà exécuté dans ce tour — non rejoué. Voici à nouveau son résultat ; ne le redemande pas une troisième fois.\n\nligne 1\nligne 2",
"result_chars": 155
}
},
{
"content": "Toujours deux lignes."
}
],
"extra": [
{
"role": "assistant",
"tool_calls": [
{
"id": "c1",
"type": "function",
"function": {
"name": "read",
"arguments": "{\"file\":\"a.txt\"}"
}
}
]
},
{
"role": "tool",
"content": "ligne 1\nligne 2",
"tool_call_id": "c1"
},
{
"role": "assistant",
"tool_calls": [
{
"id": "c2",
"type": "function",
"function": {
"name": "read",
"arguments": "{\"file\":\"a.txt\"}"
}
}
]
},
{
"role": "tool",
"content": "[déjà fait] Appel identique déjà exécuté dans ce tour — non rejoué. Voici à nouveau son résultat ; ne le redemande pas une troisième fois.\n\nligne 1\nligne 2",
"tool_call_id": "c2"
}
],
"err": ""
}
}
@@ -0,0 +1,407 @@
{
"name": "appel_textuel",
"cfg": {},
"messages": [
{
"role": "system",
"content": "Tu es Loki."
},
{
"role": "user",
"content": "Lis a.txt"
}
],
"tools": [
{
"type": "function",
"function": {
"name": "read",
"description": "Read a file with 1-indexed line numbers (offset/limit for long files). ALWAYS use this instead of cat/type: output is bounded and reading a file is REQUIRED before you may edit or overwrite it.",
"parameters": {
"properties": {
"file": {
"description": "Path (relative to the working folder)",
"type": "string"
},
"limit": {
"description": "Lines (default 400, max 1000)",
"type": "integer"
},
"offset": {
"description": "Start line (default 1)",
"type": "integer"
}
},
"required": [
"file"
],
"type": "object"
}
}
},
{
"type": "function",
"function": {
"name": "bash",
"description": "Run a shell command (bash syntax) and return stdout, stderr and exit code: inspect the system, read files and logs, run scripts. To CREATE or REWRITE a file use write instead — never echo/cat/python -c. Avoid destructive commands unless asked.",
"parameters": {
"properties": {
"command": {
"description": "The command",
"type": "string"
},
"timeout": {
"description": "Timeout s (default 30, max 300)",
"type": "integer"
}
},
"required": [
"command"
],
"type": "object"
}
}
}
],
"temperature": 0.7,
"replies": [
{
"status": 200,
"lines": [
"data: {\"choices\":[{\"delta\":{\"content\":\"\\u003ctool_call\\u003e{\\\"name\\\":\\\"read\\\",\\\"arguments\\\":{\\\"file\\\":\\\"a.txt\\\"}}\\u003c/tool_call\\u003e\"}}]}",
"data: {\"choices\":[{\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":{\"completion_tokens\":5,\"prompt_tokens\":100}}",
"data: [DONE]"
]
},
{
"status": 200,
"lines": [
"data: {\"choices\":[{\"delta\":{\"tool_calls\":[{\"function\":{\"arguments\":\"{\\\"file\\\":\\\"a.txt\\\"}\",\"name\":\"read\"},\"id\":\"c1\",\"index\":0,\"type\":\"function\"}]}}]}",
"data: {\"choices\":[{\"delta\":{},\"finish_reason\":\"tool_calls\"}],\"usage\":{\"completion_tokens\":5,\"prompt_tokens\":100}}",
"data: [DONE]"
]
},
{
"status": 200,
"lines": [
"data: {\"choices\":[{\"delta\":{\"content\":\"Deux lignes.\"}}]}",
"data: {\"choices\":[{\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":{\"completion_tokens\":5,\"prompt_tokens\":100}}",
"data: [DONE]"
]
}
],
"tool_results": {
"bash": "a.txt\nb.txt",
"read": "ligne 1\nligne 2"
},
"expect": {
"requests": [
{
"messages": [
{
"content": "Tu es Loki.",
"role": "system"
},
{
"content": "Lis a.txt",
"role": "user"
}
],
"model": "loki",
"parallel_tool_calls": false,
"stream": true,
"stream_options": {
"include_usage": true
},
"temperature": 0.7,
"tools": [
{
"function": {
"description": "Read a file with 1-indexed line numbers (offset/limit for long files). ALWAYS use this instead of cat/type: output is bounded and reading a file is REQUIRED before you may edit or overwrite it.",
"name": "read",
"parameters": {
"properties": {
"file": {
"description": "Path (relative to the working folder)",
"type": "string"
},
"limit": {
"description": "Lines (default 400, max 1000)",
"type": "integer"
},
"offset": {
"description": "Start line (default 1)",
"type": "integer"
}
},
"required": [
"file"
],
"type": "object"
}
},
"type": "function"
},
{
"function": {
"description": "Run a shell command (bash syntax) and return stdout, stderr and exit code: inspect the system, read files and logs, run scripts. To CREATE or REWRITE a file use write instead — never echo/cat/python -c. Avoid destructive commands unless asked.",
"name": "bash",
"parameters": {
"properties": {
"command": {
"description": "The command",
"type": "string"
},
"timeout": {
"description": "Timeout s (default 30, max 300)",
"type": "integer"
}
},
"required": [
"command"
],
"type": "object"
}
},
"type": "function"
}
]
},
{
"messages": [
{
"content": "Tu es Loki.",
"role": "system"
},
{
"content": "Lis a.txt",
"role": "user"
},
{
"content": "<tool_call>{\"name\":\"read\",\"arguments\":{\"file\":\"a.txt\"}}</tool_call>",
"role": "assistant"
},
{
"content": "Your last answer contained a TOOL CALL WRITTEN AS TEXT — it was never executed:\n<tool_call>{\"name\":\"read\",\"arguments\":{\"file\":\"a.txt\"}}</tool_call>\nTool calls must go through the tool-call protocol, never in the answer text. Redo it now: emit the real tool call, or answer directly without pretending to call a tool.",
"role": "user"
}
],
"model": "loki",
"parallel_tool_calls": false,
"stream": true,
"stream_options": {
"include_usage": true
},
"temperature": 0.7,
"tools": [
{
"function": {
"description": "Read a file with 1-indexed line numbers (offset/limit for long files). ALWAYS use this instead of cat/type: output is bounded and reading a file is REQUIRED before you may edit or overwrite it.",
"name": "read",
"parameters": {
"properties": {
"file": {
"description": "Path (relative to the working folder)",
"type": "string"
},
"limit": {
"description": "Lines (default 400, max 1000)",
"type": "integer"
},
"offset": {
"description": "Start line (default 1)",
"type": "integer"
}
},
"required": [
"file"
],
"type": "object"
}
},
"type": "function"
},
{
"function": {
"description": "Run a shell command (bash syntax) and return stdout, stderr and exit code: inspect the system, read files and logs, run scripts. To CREATE or REWRITE a file use write instead — never echo/cat/python -c. Avoid destructive commands unless asked.",
"name": "bash",
"parameters": {
"properties": {
"command": {
"description": "The command",
"type": "string"
},
"timeout": {
"description": "Timeout s (default 30, max 300)",
"type": "integer"
}
},
"required": [
"command"
],
"type": "object"
}
},
"type": "function"
}
]
},
{
"messages": [
{
"content": "Tu es Loki.",
"role": "system"
},
{
"content": "Lis a.txt",
"role": "user"
},
{
"content": "<tool_call>{\"name\":\"read\",\"arguments\":{\"file\":\"a.txt\"}}</tool_call>",
"role": "assistant"
},
{
"content": "Your last answer contained a TOOL CALL WRITTEN AS TEXT — it was never executed:\n<tool_call>{\"name\":\"read\",\"arguments\":{\"file\":\"a.txt\"}}</tool_call>\nTool calls must go through the tool-call protocol, never in the answer text. Redo it now: emit the real tool call, or answer directly without pretending to call a tool.",
"role": "user"
},
{
"role": "assistant",
"tool_calls": [
{
"function": {
"arguments": "{\"file\":\"a.txt\"}",
"name": "read"
},
"id": "c1",
"type": "function"
}
]
},
{
"content": "ligne 1\nligne 2",
"role": "tool",
"tool_call_id": "c1"
}
],
"model": "loki",
"parallel_tool_calls": false,
"stream": true,
"stream_options": {
"include_usage": true
},
"temperature": 0.7,
"tools": [
{
"function": {
"description": "Read a file with 1-indexed line numbers (offset/limit for long files). ALWAYS use this instead of cat/type: output is bounded and reading a file is REQUIRED before you may edit or overwrite it.",
"name": "read",
"parameters": {
"properties": {
"file": {
"description": "Path (relative to the working folder)",
"type": "string"
},
"limit": {
"description": "Lines (default 400, max 1000)",
"type": "integer"
},
"offset": {
"description": "Start line (default 1)",
"type": "integer"
}
},
"required": [
"file"
],
"type": "object"
}
},
"type": "function"
},
{
"function": {
"description": "Run a shell command (bash syntax) and return stdout, stderr and exit code: inspect the system, read files and logs, run scripts. To CREATE or REWRITE a file use write instead — never echo/cat/python -c. Avoid destructive commands unless asked.",
"name": "bash",
"parameters": {
"properties": {
"command": {
"description": "The command",
"type": "string"
},
"timeout": {
"description": "Timeout s (default 30, max 300)",
"type": "integer"
}
},
"required": [
"command"
],
"type": "object"
}
},
"type": "function"
}
]
}
],
"events": [
{
"content": "<tool_call>{\"name\":\"read\",\"arguments\":{\"file\":\"a.txt\"}}</tool_call>"
},
{
"tool_used": {
"label": "a.txt",
"name": "read",
"typing": true
}
},
{
"tool_used": {
"label": "a.txt",
"name": "read"
}
},
{
"tool_used": {
"done": true,
"label": "a.txt",
"name": "read",
"result": "ligne 1\nligne 2",
"result_chars": 15
}
},
{
"content": "Deux lignes."
}
],
"extra": [
{
"role": "assistant",
"content": "<tool_call>{\"name\":\"read\",\"arguments\":{\"file\":\"a.txt\"}}</tool_call>"
},
{
"role": "user",
"content": "Your last answer contained a TOOL CALL WRITTEN AS TEXT — it was never executed:\n<tool_call>{\"name\":\"read\",\"arguments\":{\"file\":\"a.txt\"}}</tool_call>\nTool calls must go through the tool-call protocol, never in the answer text. Redo it now: emit the real tool call, or answer directly without pretending to call a tool."
},
{
"role": "assistant",
"tool_calls": [
{
"id": "c1",
"type": "function",
"function": {
"name": "read",
"arguments": "{\"file\":\"a.txt\"}"
}
}
]
},
{
"role": "tool",
"content": "ligne 1\nligne 2",
"tool_call_id": "c1"
}
],
"err": ""
}
}
@@ -0,0 +1,292 @@
{
"name": "arguments_illisibles",
"cfg": {},
"messages": [
{
"role": "system",
"content": "Tu es Loki."
},
{
"role": "user",
"content": "Lis a.txt"
}
],
"tools": [
{
"type": "function",
"function": {
"name": "read",
"description": "Read a file with 1-indexed line numbers (offset/limit for long files). ALWAYS use this instead of cat/type: output is bounded and reading a file is REQUIRED before you may edit or overwrite it.",
"parameters": {
"properties": {
"file": {
"description": "Path (relative to the working folder)",
"type": "string"
},
"limit": {
"description": "Lines (default 400, max 1000)",
"type": "integer"
},
"offset": {
"description": "Start line (default 1)",
"type": "integer"
}
},
"required": [
"file"
],
"type": "object"
}
}
},
{
"type": "function",
"function": {
"name": "bash",
"description": "Run a shell command (bash syntax) and return stdout, stderr and exit code: inspect the system, read files and logs, run scripts. To CREATE or REWRITE a file use write instead — never echo/cat/python -c. Avoid destructive commands unless asked.",
"parameters": {
"properties": {
"command": {
"description": "The command",
"type": "string"
},
"timeout": {
"description": "Timeout s (default 30, max 300)",
"type": "integer"
}
},
"required": [
"command"
],
"type": "object"
}
}
}
],
"temperature": 0.7,
"replies": [
{
"status": 200,
"lines": [
"data: {\"choices\":[{\"delta\":{\"tool_calls\":[{\"function\":{\"arguments\":\"{\\\"file\\\":\",\"name\":\"read\"},\"id\":\"c1\",\"index\":0,\"type\":\"function\"}]}}]}",
"data: {\"choices\":[{\"delta\":{},\"finish_reason\":\"tool_calls\"}],\"usage\":{\"completion_tokens\":5,\"prompt_tokens\":100}}",
"data: [DONE]"
]
},
{
"status": 200,
"lines": [
"data: {\"choices\":[{\"delta\":{\"content\":\"Pardon.\"}}]}",
"data: {\"choices\":[{\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":{\"completion_tokens\":5,\"prompt_tokens\":100}}",
"data: [DONE]"
]
}
],
"tool_results": {
"bash": "a.txt\nb.txt",
"read": "ligne 1\nligne 2"
},
"expect": {
"requests": [
{
"messages": [
{
"content": "Tu es Loki.",
"role": "system"
},
{
"content": "Lis a.txt",
"role": "user"
}
],
"model": "loki",
"parallel_tool_calls": false,
"stream": true,
"stream_options": {
"include_usage": true
},
"temperature": 0.7,
"tools": [
{
"function": {
"description": "Read a file with 1-indexed line numbers (offset/limit for long files). ALWAYS use this instead of cat/type: output is bounded and reading a file is REQUIRED before you may edit or overwrite it.",
"name": "read",
"parameters": {
"properties": {
"file": {
"description": "Path (relative to the working folder)",
"type": "string"
},
"limit": {
"description": "Lines (default 400, max 1000)",
"type": "integer"
},
"offset": {
"description": "Start line (default 1)",
"type": "integer"
}
},
"required": [
"file"
],
"type": "object"
}
},
"type": "function"
},
{
"function": {
"description": "Run a shell command (bash syntax) and return stdout, stderr and exit code: inspect the system, read files and logs, run scripts. To CREATE or REWRITE a file use write instead — never echo/cat/python -c. Avoid destructive commands unless asked.",
"name": "bash",
"parameters": {
"properties": {
"command": {
"description": "The command",
"type": "string"
},
"timeout": {
"description": "Timeout s (default 30, max 300)",
"type": "integer"
}
},
"required": [
"command"
],
"type": "object"
}
},
"type": "function"
}
]
},
{
"messages": [
{
"content": "Tu es Loki.",
"role": "system"
},
{
"content": "Lis a.txt",
"role": "user"
},
{
"role": "assistant",
"tool_calls": [
{
"function": {
"arguments": "{}",
"name": "read"
},
"id": "c1",
"type": "function"
}
]
},
{
"content": "[erreur] arguments de l'appel illisibles (JSON invalide ou tronqué) : l'outil n'a PAS été exécuté. Renvoie l'appel avec des arguments JSON complets et valides.",
"role": "tool",
"tool_call_id": "c1"
}
],
"model": "loki",
"parallel_tool_calls": false,
"stream": true,
"stream_options": {
"include_usage": true
},
"temperature": 0.7,
"tools": [
{
"function": {
"description": "Read a file with 1-indexed line numbers (offset/limit for long files). ALWAYS use this instead of cat/type: output is bounded and reading a file is REQUIRED before you may edit or overwrite it.",
"name": "read",
"parameters": {
"properties": {
"file": {
"description": "Path (relative to the working folder)",
"type": "string"
},
"limit": {
"description": "Lines (default 400, max 1000)",
"type": "integer"
},
"offset": {
"description": "Start line (default 1)",
"type": "integer"
}
},
"required": [
"file"
],
"type": "object"
}
},
"type": "function"
},
{
"function": {
"description": "Run a shell command (bash syntax) and return stdout, stderr and exit code: inspect the system, read files and logs, run scripts. To CREATE or REWRITE a file use write instead — never echo/cat/python -c. Avoid destructive commands unless asked.",
"name": "bash",
"parameters": {
"properties": {
"command": {
"description": "The command",
"type": "string"
},
"timeout": {
"description": "Timeout s (default 30, max 300)",
"type": "integer"
}
},
"required": [
"command"
],
"type": "object"
}
},
"type": "function"
}
]
}
],
"events": [
{
"tool_used": {
"name": "read"
}
},
{
"tool_used": {
"done": true,
"name": "read",
"result": "[erreur] arguments de l'appel illisibles (JSON invalide ou tronqué) : l'outil n'a PAS été exécuté. Renvoie l'appel avec des arguments JSON complets et valides.",
"result_chars": 159
}
},
{
"content": "Pardon."
}
],
"extra": [
{
"role": "assistant",
"tool_calls": [
{
"id": "c1",
"type": "function",
"function": {
"name": "read",
"arguments": "{}"
}
}
]
},
{
"role": "tool",
"content": "[erreur] arguments de l'appel illisibles (JSON invalide ou tronqué) : l'outil n'a PAS été exécuté. Renvoie l'appel avec des arguments JSON complets et valides.",
"tool_call_id": "c1"
}
],
"err": ""
}
}
@@ -0,0 +1,643 @@
{
"name": "budget_depasse",
"cfg": {
"AGENT_BUDGET": "2"
},
"messages": [
{
"role": "system",
"content": "Tu es Loki."
},
{
"role": "user",
"content": "Explore"
}
],
"tools": [
{
"type": "function",
"function": {
"name": "read",
"description": "Read a file with 1-indexed line numbers (offset/limit for long files). ALWAYS use this instead of cat/type: output is bounded and reading a file is REQUIRED before you may edit or overwrite it.",
"parameters": {
"properties": {
"file": {
"description": "Path (relative to the working folder)",
"type": "string"
},
"limit": {
"description": "Lines (default 400, max 1000)",
"type": "integer"
},
"offset": {
"description": "Start line (default 1)",
"type": "integer"
}
},
"required": [
"file"
],
"type": "object"
}
}
},
{
"type": "function",
"function": {
"name": "bash",
"description": "Run a shell command (bash syntax) and return stdout, stderr and exit code: inspect the system, read files and logs, run scripts. To CREATE or REWRITE a file use write instead — never echo/cat/python -c. Avoid destructive commands unless asked.",
"parameters": {
"properties": {
"command": {
"description": "The command",
"type": "string"
},
"timeout": {
"description": "Timeout s (default 30, max 300)",
"type": "integer"
}
},
"required": [
"command"
],
"type": "object"
}
}
}
],
"temperature": 0.7,
"replies": [
{
"status": 200,
"lines": [
"data: {\"choices\":[{\"delta\":{\"tool_calls\":[{\"function\":{\"arguments\":\"{\\\"command\\\":\\\"ls 1\\\"}\",\"name\":\"bash\"},\"id\":\"c1\",\"index\":0,\"type\":\"function\"}]}}]}",
"data: {\"choices\":[{\"delta\":{},\"finish_reason\":\"tool_calls\"}],\"usage\":{\"completion_tokens\":5,\"prompt_tokens\":100}}",
"data: [DONE]"
]
},
{
"status": 200,
"lines": [
"data: {\"choices\":[{\"delta\":{\"tool_calls\":[{\"function\":{\"arguments\":\"{\\\"command\\\":\\\"ls 2\\\"}\",\"name\":\"bash\"},\"id\":\"c2\",\"index\":0,\"type\":\"function\"}]}}]}",
"data: {\"choices\":[{\"delta\":{},\"finish_reason\":\"tool_calls\"}],\"usage\":{\"completion_tokens\":5,\"prompt_tokens\":100}}",
"data: [DONE]"
]
},
{
"status": 200,
"lines": [
"data: {\"choices\":[{\"delta\":{\"tool_calls\":[{\"function\":{\"arguments\":\"{\\\"command\\\":\\\"ls 3\\\"}\",\"name\":\"bash\"},\"id\":\"c3\",\"index\":0,\"type\":\"function\"}]}}]}",
"data: {\"choices\":[{\"delta\":{},\"finish_reason\":\"tool_calls\"}],\"usage\":{\"completion_tokens\":5,\"prompt_tokens\":100}}",
"data: [DONE]"
]
},
{
"status": 200,
"lines": [
"data: {\"choices\":[{\"delta\":{\"content\":\"J'arrête là.\"}}]}",
"data: {\"choices\":[{\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":{\"completion_tokens\":5,\"prompt_tokens\":100}}",
"data: [DONE]"
]
}
],
"tool_results": {
"bash": "a.txt\nb.txt",
"read": "ligne 1\nligne 2"
},
"expect": {
"requests": [
{
"messages": [
{
"content": "Tu es Loki.",
"role": "system"
},
{
"content": "Explore",
"role": "user"
}
],
"model": "loki",
"parallel_tool_calls": false,
"stream": true,
"stream_options": {
"include_usage": true
},
"temperature": 0.7,
"tools": [
{
"function": {
"description": "Read a file with 1-indexed line numbers (offset/limit for long files). ALWAYS use this instead of cat/type: output is bounded and reading a file is REQUIRED before you may edit or overwrite it.",
"name": "read",
"parameters": {
"properties": {
"file": {
"description": "Path (relative to the working folder)",
"type": "string"
},
"limit": {
"description": "Lines (default 400, max 1000)",
"type": "integer"
},
"offset": {
"description": "Start line (default 1)",
"type": "integer"
}
},
"required": [
"file"
],
"type": "object"
}
},
"type": "function"
},
{
"function": {
"description": "Run a shell command (bash syntax) and return stdout, stderr and exit code: inspect the system, read files and logs, run scripts. To CREATE or REWRITE a file use write instead — never echo/cat/python -c. Avoid destructive commands unless asked.",
"name": "bash",
"parameters": {
"properties": {
"command": {
"description": "The command",
"type": "string"
},
"timeout": {
"description": "Timeout s (default 30, max 300)",
"type": "integer"
}
},
"required": [
"command"
],
"type": "object"
}
},
"type": "function"
}
]
},
{
"messages": [
{
"content": "Tu es Loki.",
"role": "system"
},
{
"content": "Explore",
"role": "user"
},
{
"role": "assistant",
"tool_calls": [
{
"function": {
"arguments": "{\"command\":\"ls 1\"}",
"name": "bash"
},
"id": "c1",
"type": "function"
}
]
},
{
"content": "a.txt\nb.txt",
"role": "tool",
"tool_call_id": "c1"
}
],
"model": "loki",
"parallel_tool_calls": false,
"stream": true,
"stream_options": {
"include_usage": true
},
"temperature": 0.7,
"tools": [
{
"function": {
"description": "Read a file with 1-indexed line numbers (offset/limit for long files). ALWAYS use this instead of cat/type: output is bounded and reading a file is REQUIRED before you may edit or overwrite it.",
"name": "read",
"parameters": {
"properties": {
"file": {
"description": "Path (relative to the working folder)",
"type": "string"
},
"limit": {
"description": "Lines (default 400, max 1000)",
"type": "integer"
},
"offset": {
"description": "Start line (default 1)",
"type": "integer"
}
},
"required": [
"file"
],
"type": "object"
}
},
"type": "function"
},
{
"function": {
"description": "Run a shell command (bash syntax) and return stdout, stderr and exit code: inspect the system, read files and logs, run scripts. To CREATE or REWRITE a file use write instead — never echo/cat/python -c. Avoid destructive commands unless asked.",
"name": "bash",
"parameters": {
"properties": {
"command": {
"description": "The command",
"type": "string"
},
"timeout": {
"description": "Timeout s (default 30, max 300)",
"type": "integer"
}
},
"required": [
"command"
],
"type": "object"
}
},
"type": "function"
}
]
},
{
"messages": [
{
"content": "Tu es Loki.",
"role": "system"
},
{
"content": "Explore",
"role": "user"
},
{
"role": "assistant",
"tool_calls": [
{
"function": {
"arguments": "{\"command\":\"ls 1\"}",
"name": "bash"
},
"id": "c1",
"type": "function"
}
]
},
{
"content": "a.txt\nb.txt",
"role": "tool",
"tool_call_id": "c1"
},
{
"role": "assistant",
"tool_calls": [
{
"function": {
"arguments": "{\"command\":\"ls 2\"}",
"name": "bash"
},
"id": "c2",
"type": "function"
}
]
},
{
"content": "a.txt\nb.txt",
"role": "tool",
"tool_call_id": "c2"
},
{
"content": "[system] You have made 2 tool calls in this single turn. That is a lot: you almost certainly have enough to answer already. Stop exploring and write your final answer now, unless exactly one specific call is genuinely still missing.",
"role": "user"
}
],
"model": "loki",
"parallel_tool_calls": false,
"stream": true,
"stream_options": {
"include_usage": true
},
"temperature": 0.7,
"tools": [
{
"function": {
"description": "Read a file with 1-indexed line numbers (offset/limit for long files). ALWAYS use this instead of cat/type: output is bounded and reading a file is REQUIRED before you may edit or overwrite it.",
"name": "read",
"parameters": {
"properties": {
"file": {
"description": "Path (relative to the working folder)",
"type": "string"
},
"limit": {
"description": "Lines (default 400, max 1000)",
"type": "integer"
},
"offset": {
"description": "Start line (default 1)",
"type": "integer"
}
},
"required": [
"file"
],
"type": "object"
}
},
"type": "function"
},
{
"function": {
"description": "Run a shell command (bash syntax) and return stdout, stderr and exit code: inspect the system, read files and logs, run scripts. To CREATE or REWRITE a file use write instead — never echo/cat/python -c. Avoid destructive commands unless asked.",
"name": "bash",
"parameters": {
"properties": {
"command": {
"description": "The command",
"type": "string"
},
"timeout": {
"description": "Timeout s (default 30, max 300)",
"type": "integer"
}
},
"required": [
"command"
],
"type": "object"
}
},
"type": "function"
}
]
},
{
"messages": [
{
"content": "Tu es Loki.",
"role": "system"
},
{
"content": "Explore",
"role": "user"
},
{
"role": "assistant",
"tool_calls": [
{
"function": {
"arguments": "{\"command\":\"ls 1\"}",
"name": "bash"
},
"id": "c1",
"type": "function"
}
]
},
{
"content": "a.txt\nb.txt",
"role": "tool",
"tool_call_id": "c1"
},
{
"role": "assistant",
"tool_calls": [
{
"function": {
"arguments": "{\"command\":\"ls 2\"}",
"name": "bash"
},
"id": "c2",
"type": "function"
}
]
},
{
"content": "a.txt\nb.txt",
"role": "tool",
"tool_call_id": "c2"
},
{
"content": "[system] You have made 2 tool calls in this single turn. That is a lot: you almost certainly have enough to answer already. Stop exploring and write your final answer now, unless exactly one specific call is genuinely still missing.",
"role": "user"
},
{
"role": "assistant",
"tool_calls": [
{
"function": {
"arguments": "{\"command\":\"ls 3\"}",
"name": "bash"
},
"id": "c3",
"type": "function"
}
]
},
{
"content": "a.txt\nb.txt",
"role": "tool",
"tool_call_id": "c3"
}
],
"model": "loki",
"parallel_tool_calls": false,
"stream": true,
"stream_options": {
"include_usage": true
},
"temperature": 0.7,
"tools": [
{
"function": {
"description": "Read a file with 1-indexed line numbers (offset/limit for long files). ALWAYS use this instead of cat/type: output is bounded and reading a file is REQUIRED before you may edit or overwrite it.",
"name": "read",
"parameters": {
"properties": {
"file": {
"description": "Path (relative to the working folder)",
"type": "string"
},
"limit": {
"description": "Lines (default 400, max 1000)",
"type": "integer"
},
"offset": {
"description": "Start line (default 1)",
"type": "integer"
}
},
"required": [
"file"
],
"type": "object"
}
},
"type": "function"
},
{
"function": {
"description": "Run a shell command (bash syntax) and return stdout, stderr and exit code: inspect the system, read files and logs, run scripts. To CREATE or REWRITE a file use write instead — never echo/cat/python -c. Avoid destructive commands unless asked.",
"name": "bash",
"parameters": {
"properties": {
"command": {
"description": "The command",
"type": "string"
},
"timeout": {
"description": "Timeout s (default 30, max 300)",
"type": "integer"
}
},
"required": [
"command"
],
"type": "object"
}
},
"type": "function"
}
]
}
],
"events": [
{
"tool_used": {
"label": "ls 1",
"name": "bash",
"typing": true
}
},
{
"tool_used": {
"label": "ls 1",
"name": "bash"
}
},
{
"tool_used": {
"done": true,
"label": "ls 1",
"name": "bash",
"result": "a.txt\nb.txt",
"result_chars": 11
}
},
{
"tool_used": {
"label": "ls 2",
"name": "bash",
"typing": true
}
},
{
"tool_used": {
"label": "ls 2",
"name": "bash"
}
},
{
"tool_used": {
"done": true,
"label": "ls 2",
"name": "bash",
"result": "a.txt\nb.txt",
"result_chars": 11
}
},
{
"tool_used": {
"label": "ls 3",
"name": "bash",
"typing": true
}
},
{
"tool_used": {
"label": "ls 3",
"name": "bash"
}
},
{
"tool_used": {
"done": true,
"label": "ls 3",
"name": "bash",
"result": "a.txt\nb.txt",
"result_chars": 11
}
},
{
"content": "J'arrête là."
}
],
"extra": [
{
"role": "assistant",
"tool_calls": [
{
"id": "c1",
"type": "function",
"function": {
"name": "bash",
"arguments": "{\"command\":\"ls 1\"}"
}
}
]
},
{
"role": "tool",
"content": "a.txt\nb.txt",
"tool_call_id": "c1"
},
{
"role": "assistant",
"tool_calls": [
{
"id": "c2",
"type": "function",
"function": {
"name": "bash",
"arguments": "{\"command\":\"ls 2\"}"
}
}
]
},
{
"role": "tool",
"content": "a.txt\nb.txt",
"tool_call_id": "c2"
},
{
"role": "user",
"content": "[system] You have made 2 tool calls in this single turn. That is a lot: you almost certainly have enough to answer already. Stop exploring and write your final answer now, unless exactly one specific call is genuinely still missing."
},
{
"role": "assistant",
"tool_calls": [
{
"id": "c3",
"type": "function",
"function": {
"name": "bash",
"arguments": "{\"command\":\"ls 3\"}"
}
}
]
},
{
"role": "tool",
"content": "a.txt\nb.txt",
"tool_call_id": "c3"
}
],
"err": ""
}
}
@@ -0,0 +1,343 @@
{
"name": "deux_outils_en_parallele",
"cfg": {},
"messages": [
{
"role": "system",
"content": "Tu es Loki."
},
{
"role": "user",
"content": "Liste puis lis"
}
],
"tools": [
{
"type": "function",
"function": {
"name": "read",
"description": "Read a file with 1-indexed line numbers (offset/limit for long files). ALWAYS use this instead of cat/type: output is bounded and reading a file is REQUIRED before you may edit or overwrite it.",
"parameters": {
"properties": {
"file": {
"description": "Path (relative to the working folder)",
"type": "string"
},
"limit": {
"description": "Lines (default 400, max 1000)",
"type": "integer"
},
"offset": {
"description": "Start line (default 1)",
"type": "integer"
}
},
"required": [
"file"
],
"type": "object"
}
}
},
{
"type": "function",
"function": {
"name": "bash",
"description": "Run a shell command (bash syntax) and return stdout, stderr and exit code: inspect the system, read files and logs, run scripts. To CREATE or REWRITE a file use write instead — never echo/cat/python -c. Avoid destructive commands unless asked.",
"parameters": {
"properties": {
"command": {
"description": "The command",
"type": "string"
},
"timeout": {
"description": "Timeout s (default 30, max 300)",
"type": "integer"
}
},
"required": [
"command"
],
"type": "object"
}
}
}
],
"temperature": 0.7,
"replies": [
{
"status": 200,
"lines": [
"data: {\"choices\":[{\"delta\":{\"tool_calls\":[{\"function\":{\"arguments\":\"{\\\"command\\\":\\\"ls\\\"}\",\"name\":\"bash\"},\"id\":\"c1\",\"index\":0,\"type\":\"function\"}]}}]}",
"data: {\"choices\":[{\"delta\":{\"tool_calls\":[{\"function\":{\"arguments\":\"{\\\"file\\\":\\\"a.txt\\\"}\",\"name\":\"read\"},\"id\":\"c2\",\"index\":1,\"type\":\"function\"}]}}]}",
"data: {\"choices\":[{\"delta\":{},\"finish_reason\":\"tool_calls\"}],\"usage\":{\"completion_tokens\":5,\"prompt_tokens\":100}}",
"data: [DONE]"
]
},
{
"status": 200,
"lines": [
"data: {\"choices\":[{\"delta\":{\"content\":\"Fait.\"}}]}",
"data: {\"choices\":[{\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":{\"completion_tokens\":5,\"prompt_tokens\":100}}",
"data: [DONE]"
]
}
],
"tool_results": {
"bash": "a.txt\nb.txt",
"read": "ligne 1\nligne 2"
},
"expect": {
"requests": [
{
"messages": [
{
"content": "Tu es Loki.",
"role": "system"
},
{
"content": "Liste puis lis",
"role": "user"
}
],
"model": "loki",
"parallel_tool_calls": false,
"stream": true,
"stream_options": {
"include_usage": true
},
"temperature": 0.7,
"tools": [
{
"function": {
"description": "Read a file with 1-indexed line numbers (offset/limit for long files). ALWAYS use this instead of cat/type: output is bounded and reading a file is REQUIRED before you may edit or overwrite it.",
"name": "read",
"parameters": {
"properties": {
"file": {
"description": "Path (relative to the working folder)",
"type": "string"
},
"limit": {
"description": "Lines (default 400, max 1000)",
"type": "integer"
},
"offset": {
"description": "Start line (default 1)",
"type": "integer"
}
},
"required": [
"file"
],
"type": "object"
}
},
"type": "function"
},
{
"function": {
"description": "Run a shell command (bash syntax) and return stdout, stderr and exit code: inspect the system, read files and logs, run scripts. To CREATE or REWRITE a file use write instead — never echo/cat/python -c. Avoid destructive commands unless asked.",
"name": "bash",
"parameters": {
"properties": {
"command": {
"description": "The command",
"type": "string"
},
"timeout": {
"description": "Timeout s (default 30, max 300)",
"type": "integer"
}
},
"required": [
"command"
],
"type": "object"
}
},
"type": "function"
}
]
},
{
"messages": [
{
"content": "Tu es Loki.",
"role": "system"
},
{
"content": "Liste puis lis",
"role": "user"
},
{
"role": "assistant",
"tool_calls": [
{
"function": {
"arguments": "{\"command\":\"ls\"}",
"name": "bash"
},
"id": "c1",
"type": "function"
},
{
"function": {
"arguments": "{\"file\":\"a.txt\"}",
"name": "read"
},
"id": "c2",
"type": "function"
}
]
},
{
"content": "a.txt\nb.txt",
"role": "tool",
"tool_call_id": "c1"
},
{
"content": "ligne 1\nligne 2",
"role": "tool",
"tool_call_id": "c2"
}
],
"model": "loki",
"parallel_tool_calls": false,
"stream": true,
"stream_options": {
"include_usage": true
},
"temperature": 0.7,
"tools": [
{
"function": {
"description": "Read a file with 1-indexed line numbers (offset/limit for long files). ALWAYS use this instead of cat/type: output is bounded and reading a file is REQUIRED before you may edit or overwrite it.",
"name": "read",
"parameters": {
"properties": {
"file": {
"description": "Path (relative to the working folder)",
"type": "string"
},
"limit": {
"description": "Lines (default 400, max 1000)",
"type": "integer"
},
"offset": {
"description": "Start line (default 1)",
"type": "integer"
}
},
"required": [
"file"
],
"type": "object"
}
},
"type": "function"
},
{
"function": {
"description": "Run a shell command (bash syntax) and return stdout, stderr and exit code: inspect the system, read files and logs, run scripts. To CREATE or REWRITE a file use write instead — never echo/cat/python -c. Avoid destructive commands unless asked.",
"name": "bash",
"parameters": {
"properties": {
"command": {
"description": "The command",
"type": "string"
},
"timeout": {
"description": "Timeout s (default 30, max 300)",
"type": "integer"
}
},
"required": [
"command"
],
"type": "object"
}
},
"type": "function"
}
]
}
],
"events": [
{
"tool_used": {
"label": "ls",
"name": "bash",
"typing": true
}
},
{
"tool_used": {
"label": "ls",
"name": "bash"
}
},
{
"tool_used": {
"done": true,
"label": "ls",
"name": "bash",
"result": "a.txt\nb.txt",
"result_chars": 11
}
},
{
"tool_used": {
"label": "a.txt",
"name": "read"
}
},
{
"tool_used": {
"done": true,
"label": "a.txt",
"name": "read",
"result": "ligne 1\nligne 2",
"result_chars": 15
}
},
{
"content": "Fait."
}
],
"extra": [
{
"role": "assistant",
"tool_calls": [
{
"id": "c1",
"type": "function",
"function": {
"name": "bash",
"arguments": "{\"command\":\"ls\"}"
}
},
{
"id": "c2",
"type": "function",
"function": {
"name": "read",
"arguments": "{\"file\":\"a.txt\"}"
}
}
]
},
{
"role": "tool",
"content": "a.txt\nb.txt",
"tool_call_id": "c1"
},
{
"role": "tool",
"content": "ligne 1\nligne 2",
"tool_call_id": "c2"
}
],
"err": ""
}
}
@@ -0,0 +1,173 @@
{
"name": "echantillonnage_et_effort",
"cfg": {
"REASONING_EFFORT": "low",
"TOP_K": "40",
"TOP_P": "0.9"
},
"messages": [
{
"role": "system",
"content": "Tu es Loki."
},
{
"role": "user",
"content": "Salut"
}
],
"tools": [
{
"type": "function",
"function": {
"name": "read",
"description": "Read a file with 1-indexed line numbers (offset/limit for long files). ALWAYS use this instead of cat/type: output is bounded and reading a file is REQUIRED before you may edit or overwrite it.",
"parameters": {
"properties": {
"file": {
"description": "Path (relative to the working folder)",
"type": "string"
},
"limit": {
"description": "Lines (default 400, max 1000)",
"type": "integer"
},
"offset": {
"description": "Start line (default 1)",
"type": "integer"
}
},
"required": [
"file"
],
"type": "object"
}
}
},
{
"type": "function",
"function": {
"name": "bash",
"description": "Run a shell command (bash syntax) and return stdout, stderr and exit code: inspect the system, read files and logs, run scripts. To CREATE or REWRITE a file use write instead — never echo/cat/python -c. Avoid destructive commands unless asked.",
"parameters": {
"properties": {
"command": {
"description": "The command",
"type": "string"
},
"timeout": {
"description": "Timeout s (default 30, max 300)",
"type": "integer"
}
},
"required": [
"command"
],
"type": "object"
}
}
}
],
"temperature": 0.7,
"replies": [
{
"status": 200,
"lines": [
"data: {\"choices\":[{\"delta\":{\"content\":\"Bonjour.\"}}]}",
"data: {\"choices\":[{\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":{\"completion_tokens\":5,\"prompt_tokens\":100}}",
"data: [DONE]"
]
}
],
"tool_results": {
"bash": "a.txt\nb.txt",
"read": "ligne 1\nligne 2"
},
"expect": {
"requests": [
{
"chat_template_kwargs": {
"reasoning_effort": "low"
},
"messages": [
{
"content": "Tu es Loki.",
"role": "system"
},
{
"content": "Salut",
"role": "user"
}
],
"model": "loki",
"parallel_tool_calls": false,
"reasoning_effort": "low",
"stream": true,
"stream_options": {
"include_usage": true
},
"temperature": 0.7,
"tools": [
{
"function": {
"description": "Read a file with 1-indexed line numbers (offset/limit for long files). ALWAYS use this instead of cat/type: output is bounded and reading a file is REQUIRED before you may edit or overwrite it.",
"name": "read",
"parameters": {
"properties": {
"file": {
"description": "Path (relative to the working folder)",
"type": "string"
},
"limit": {
"description": "Lines (default 400, max 1000)",
"type": "integer"
},
"offset": {
"description": "Start line (default 1)",
"type": "integer"
}
},
"required": [
"file"
],
"type": "object"
}
},
"type": "function"
},
{
"function": {
"description": "Run a shell command (bash syntax) and return stdout, stderr and exit code: inspect the system, read files and logs, run scripts. To CREATE or REWRITE a file use write instead — never echo/cat/python -c. Avoid destructive commands unless asked.",
"name": "bash",
"parameters": {
"properties": {
"command": {
"description": "The command",
"type": "string"
},
"timeout": {
"description": "Timeout s (default 30, max 300)",
"type": "integer"
}
},
"required": [
"command"
],
"type": "object"
}
},
"type": "function"
}
],
"top_k": 40,
"top_p": 0.9
}
],
"events": [
{
"content": "Bonjour."
}
],
"extra": [],
"err": ""
}
}
@@ -0,0 +1,241 @@
{
"name": "erreur_500_avec_outils",
"cfg": {},
"messages": [
{
"role": "system",
"content": "Tu es Loki."
},
{
"role": "user",
"content": "Bonjour"
}
],
"tools": [
{
"type": "function",
"function": {
"name": "read",
"description": "Read a file with 1-indexed line numbers (offset/limit for long files). ALWAYS use this instead of cat/type: output is bounded and reading a file is REQUIRED before you may edit or overwrite it.",
"parameters": {
"properties": {
"file": {
"description": "Path (relative to the working folder)",
"type": "string"
},
"limit": {
"description": "Lines (default 400, max 1000)",
"type": "integer"
},
"offset": {
"description": "Start line (default 1)",
"type": "integer"
}
},
"required": [
"file"
],
"type": "object"
}
}
},
{
"type": "function",
"function": {
"name": "bash",
"description": "Run a shell command (bash syntax) and return stdout, stderr and exit code: inspect the system, read files and logs, run scripts. To CREATE or REWRITE a file use write instead — never echo/cat/python -c. Avoid destructive commands unless asked.",
"parameters": {
"properties": {
"command": {
"description": "The command",
"type": "string"
},
"timeout": {
"description": "Timeout s (default 30, max 300)",
"type": "integer"
}
},
"required": [
"command"
],
"type": "object"
}
}
}
],
"temperature": 0.7,
"replies": [
{
"status": 500,
"lines": [
"{\"error\":{\"code\":500,\"message\":\"Failed to parse tool call\",\"type\":\"server_error\"}}"
]
},
{
"status": 200,
"lines": [
"data: {\"choices\":[{\"delta\":{\"content\":\"Salut.\"}}]}",
"data: {\"choices\":[{\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":{\"completion_tokens\":5,\"prompt_tokens\":100}}",
"data: [DONE]"
]
}
],
"tool_results": {
"bash": "a.txt\nb.txt",
"read": "ligne 1\nligne 2"
},
"expect": {
"requests": [
{
"messages": [
{
"content": "Tu es Loki.",
"role": "system"
},
{
"content": "Bonjour",
"role": "user"
}
],
"model": "loki",
"parallel_tool_calls": false,
"stream": true,
"stream_options": {
"include_usage": true
},
"temperature": 0.7,
"tools": [
{
"function": {
"description": "Read a file with 1-indexed line numbers (offset/limit for long files). ALWAYS use this instead of cat/type: output is bounded and reading a file is REQUIRED before you may edit or overwrite it.",
"name": "read",
"parameters": {
"properties": {
"file": {
"description": "Path (relative to the working folder)",
"type": "string"
},
"limit": {
"description": "Lines (default 400, max 1000)",
"type": "integer"
},
"offset": {
"description": "Start line (default 1)",
"type": "integer"
}
},
"required": [
"file"
],
"type": "object"
}
},
"type": "function"
},
{
"function": {
"description": "Run a shell command (bash syntax) and return stdout, stderr and exit code: inspect the system, read files and logs, run scripts. To CREATE or REWRITE a file use write instead — never echo/cat/python -c. Avoid destructive commands unless asked.",
"name": "bash",
"parameters": {
"properties": {
"command": {
"description": "The command",
"type": "string"
},
"timeout": {
"description": "Timeout s (default 30, max 300)",
"type": "integer"
}
},
"required": [
"command"
],
"type": "object"
}
},
"type": "function"
}
]
},
{
"messages": [
{
"content": "Tu es Loki.",
"role": "system"
},
{
"content": "Bonjour\n\n[system] Do not call any more tools. Answer now, directly, in the user's language, using only the information already gathered.",
"role": "user"
}
],
"model": "loki",
"parallel_tool_calls": false,
"stream": true,
"stream_options": {
"include_usage": true
},
"temperature": 0.7,
"tool_choice": "none",
"tools": [
{
"function": {
"description": "Read a file with 1-indexed line numbers (offset/limit for long files). ALWAYS use this instead of cat/type: output is bounded and reading a file is REQUIRED before you may edit or overwrite it.",
"name": "read",
"parameters": {
"properties": {
"file": {
"description": "Path (relative to the working folder)",
"type": "string"
},
"limit": {
"description": "Lines (default 400, max 1000)",
"type": "integer"
},
"offset": {
"description": "Start line (default 1)",
"type": "integer"
}
},
"required": [
"file"
],
"type": "object"
}
},
"type": "function"
},
{
"function": {
"description": "Run a shell command (bash syntax) and return stdout, stderr and exit code: inspect the system, read files and logs, run scripts. To CREATE or REWRITE a file use write instead — never echo/cat/python -c. Avoid destructive commands unless asked.",
"name": "bash",
"parameters": {
"properties": {
"command": {
"description": "The command",
"type": "string"
},
"timeout": {
"description": "Timeout s (default 30, max 300)",
"type": "integer"
}
},
"required": [
"command"
],
"type": "object"
}
},
"type": "function"
}
]
}
],
"events": [
{
"content": "Salut."
}
],
"extra": [],
"err": ""
}
}
@@ -0,0 +1,265 @@
{
"name": "erreur_500_deux_fois",
"cfg": {},
"messages": [
{
"role": "system",
"content": "Tu es Loki."
},
{
"role": "user",
"content": "Bonjour"
}
],
"tools": [
{
"type": "function",
"function": {
"name": "read",
"description": "Read a file with 1-indexed line numbers (offset/limit for long files). ALWAYS use this instead of cat/type: output is bounded and reading a file is REQUIRED before you may edit or overwrite it.",
"parameters": {
"properties": {
"file": {
"description": "Path (relative to the working folder)",
"type": "string"
},
"limit": {
"description": "Lines (default 400, max 1000)",
"type": "integer"
},
"offset": {
"description": "Start line (default 1)",
"type": "integer"
}
},
"required": [
"file"
],
"type": "object"
}
}
},
{
"type": "function",
"function": {
"name": "bash",
"description": "Run a shell command (bash syntax) and return stdout, stderr and exit code: inspect the system, read files and logs, run scripts. To CREATE or REWRITE a file use write instead — never echo/cat/python -c. Avoid destructive commands unless asked.",
"parameters": {
"properties": {
"command": {
"description": "The command",
"type": "string"
},
"timeout": {
"description": "Timeout s (default 30, max 300)",
"type": "integer"
}
},
"required": [
"command"
],
"type": "object"
}
}
}
],
"temperature": 0.7,
"replies": [
{
"status": 500,
"lines": [
"{\"error\":{\"code\":500,\"message\":\"Failed to parse tool call\",\"type\":\"server_error\"}}"
]
},
{
"status": 500,
"lines": [
"{\"error\":{\"code\":500,\"message\":\"Failed to parse tool call\",\"type\":\"server_error\"}}"
]
},
{
"status": 200,
"lines": [
"data: {\"choices\":[{\"delta\":{\"content\":\"Salut.\"}}]}",
"data: {\"choices\":[{\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":{\"completion_tokens\":5,\"prompt_tokens\":100}}",
"data: [DONE]"
]
}
],
"tool_results": {
"bash": "a.txt\nb.txt",
"read": "ligne 1\nligne 2"
},
"expect": {
"requests": [
{
"messages": [
{
"content": "Tu es Loki.",
"role": "system"
},
{
"content": "Bonjour",
"role": "user"
}
],
"model": "loki",
"parallel_tool_calls": false,
"stream": true,
"stream_options": {
"include_usage": true
},
"temperature": 0.7,
"tools": [
{
"function": {
"description": "Read a file with 1-indexed line numbers (offset/limit for long files). ALWAYS use this instead of cat/type: output is bounded and reading a file is REQUIRED before you may edit or overwrite it.",
"name": "read",
"parameters": {
"properties": {
"file": {
"description": "Path (relative to the working folder)",
"type": "string"
},
"limit": {
"description": "Lines (default 400, max 1000)",
"type": "integer"
},
"offset": {
"description": "Start line (default 1)",
"type": "integer"
}
},
"required": [
"file"
],
"type": "object"
}
},
"type": "function"
},
{
"function": {
"description": "Run a shell command (bash syntax) and return stdout, stderr and exit code: inspect the system, read files and logs, run scripts. To CREATE or REWRITE a file use write instead — never echo/cat/python -c. Avoid destructive commands unless asked.",
"name": "bash",
"parameters": {
"properties": {
"command": {
"description": "The command",
"type": "string"
},
"timeout": {
"description": "Timeout s (default 30, max 300)",
"type": "integer"
}
},
"required": [
"command"
],
"type": "object"
}
},
"type": "function"
}
]
},
{
"messages": [
{
"content": "Tu es Loki.",
"role": "system"
},
{
"content": "Bonjour\n\n[system] Do not call any more tools. Answer now, directly, in the user's language, using only the information already gathered.",
"role": "user"
}
],
"model": "loki",
"parallel_tool_calls": false,
"stream": true,
"stream_options": {
"include_usage": true
},
"temperature": 0.7,
"tool_choice": "none",
"tools": [
{
"function": {
"description": "Read a file with 1-indexed line numbers (offset/limit for long files). ALWAYS use this instead of cat/type: output is bounded and reading a file is REQUIRED before you may edit or overwrite it.",
"name": "read",
"parameters": {
"properties": {
"file": {
"description": "Path (relative to the working folder)",
"type": "string"
},
"limit": {
"description": "Lines (default 400, max 1000)",
"type": "integer"
},
"offset": {
"description": "Start line (default 1)",
"type": "integer"
}
},
"required": [
"file"
],
"type": "object"
}
},
"type": "function"
},
{
"function": {
"description": "Run a shell command (bash syntax) and return stdout, stderr and exit code: inspect the system, read files and logs, run scripts. To CREATE or REWRITE a file use write instead — never echo/cat/python -c. Avoid destructive commands unless asked.",
"name": "bash",
"parameters": {
"properties": {
"command": {
"description": "The command",
"type": "string"
},
"timeout": {
"description": "Timeout s (default 30, max 300)",
"type": "integer"
}
},
"required": [
"command"
],
"type": "object"
}
},
"type": "function"
}
]
},
{
"messages": [
{
"content": "Tu es Loki.\n\nDo not call any more tools. Answer now, directly, in the user's language, using only the information already gathered.",
"role": "system"
},
{
"content": "Bonjour",
"role": "user"
}
],
"model": "loki",
"stream": true,
"stream_options": {
"include_usage": true
},
"temperature": 0.7
}
],
"events": [
{
"content": "Salut."
}
],
"extra": [],
"err": ""
}
}
@@ -0,0 +1,161 @@
{
"name": "erreur_moteur",
"cfg": {},
"messages": [
{
"role": "system",
"content": "Tu es Loki."
},
{
"role": "user",
"content": "Bonjour"
}
],
"tools": [
{
"type": "function",
"function": {
"name": "read",
"description": "Read a file with 1-indexed line numbers (offset/limit for long files). ALWAYS use this instead of cat/type: output is bounded and reading a file is REQUIRED before you may edit or overwrite it.",
"parameters": {
"properties": {
"file": {
"description": "Path (relative to the working folder)",
"type": "string"
},
"limit": {
"description": "Lines (default 400, max 1000)",
"type": "integer"
},
"offset": {
"description": "Start line (default 1)",
"type": "integer"
}
},
"required": [
"file"
],
"type": "object"
}
}
},
{
"type": "function",
"function": {
"name": "bash",
"description": "Run a shell command (bash syntax) and return stdout, stderr and exit code: inspect the system, read files and logs, run scripts. To CREATE or REWRITE a file use write instead — never echo/cat/python -c. Avoid destructive commands unless asked.",
"parameters": {
"properties": {
"command": {
"description": "The command",
"type": "string"
},
"timeout": {
"description": "Timeout s (default 30, max 300)",
"type": "integer"
}
},
"required": [
"command"
],
"type": "object"
}
}
}
],
"temperature": 0.7,
"replies": [
{
"status": 400,
"lines": [
"{\"error\":{\"code\":400,\"message\":\"requête invalide\",\"type\":\"invalid_request_error\"}}"
]
}
],
"tool_results": {
"bash": "a.txt\nb.txt",
"read": "ligne 1\nligne 2"
},
"expect": {
"requests": [
{
"messages": [
{
"content": "Tu es Loki.",
"role": "system"
},
{
"content": "Bonjour",
"role": "user"
}
],
"model": "loki",
"parallel_tool_calls": false,
"stream": true,
"stream_options": {
"include_usage": true
},
"temperature": 0.7,
"tools": [
{
"function": {
"description": "Read a file with 1-indexed line numbers (offset/limit for long files). ALWAYS use this instead of cat/type: output is bounded and reading a file is REQUIRED before you may edit or overwrite it.",
"name": "read",
"parameters": {
"properties": {
"file": {
"description": "Path (relative to the working folder)",
"type": "string"
},
"limit": {
"description": "Lines (default 400, max 1000)",
"type": "integer"
},
"offset": {
"description": "Start line (default 1)",
"type": "integer"
}
},
"required": [
"file"
],
"type": "object"
}
},
"type": "function"
},
{
"function": {
"description": "Run a shell command (bash syntax) and return stdout, stderr and exit code: inspect the system, read files and logs, run scripts. To CREATE or REWRITE a file use write instead — never echo/cat/python -c. Avoid destructive commands unless asked.",
"name": "bash",
"parameters": {
"properties": {
"command": {
"description": "The command",
"type": "string"
},
"timeout": {
"description": "Timeout s (default 30, max 300)",
"type": "integer"
}
},
"required": [
"command"
],
"type": "object"
}
},
"type": "function"
}
]
}
],
"events": [
{
"err": "llama-server a renvoyé 400 : {\"error\":{\"code\":400,\"message\":\"requête invalide\",\"type\":\"invalid_request_error\"}}"
}
],
"extra": [],
"err": "llama-server a renvoyé 400 : {\"error\":{\"code\":400,\"message\":\"requête invalide\",\"type\":\"invalid_request_error\"}}"
}
}
@@ -0,0 +1,379 @@
{
"name": "historique_avec_outils",
"cfg": {},
"messages": [
{
"role": "system",
"content": "Tu es Loki."
},
{
"role": "user",
"content": "Lis a.txt"
},
{
"role": "assistant",
"tool_calls": [
{
"id": "c0",
"type": "function",
"function": {
"name": "read",
"arguments": "{\"file\":\"a.txt\"}"
}
}
]
},
{
"role": "tool",
"content": "ligne 1",
"tool_call_id": "c0"
},
{
"role": "assistant",
"content": "Une ligne."
},
{
"role": "user",
"content": "Et b.txt ?"
}
],
"tools": [
{
"type": "function",
"function": {
"name": "read",
"description": "Read a file with 1-indexed line numbers (offset/limit for long files). ALWAYS use this instead of cat/type: output is bounded and reading a file is REQUIRED before you may edit or overwrite it.",
"parameters": {
"properties": {
"file": {
"description": "Path (relative to the working folder)",
"type": "string"
},
"limit": {
"description": "Lines (default 400, max 1000)",
"type": "integer"
},
"offset": {
"description": "Start line (default 1)",
"type": "integer"
}
},
"required": [
"file"
],
"type": "object"
}
}
},
{
"type": "function",
"function": {
"name": "bash",
"description": "Run a shell command (bash syntax) and return stdout, stderr and exit code: inspect the system, read files and logs, run scripts. To CREATE or REWRITE a file use write instead — never echo/cat/python -c. Avoid destructive commands unless asked.",
"parameters": {
"properties": {
"command": {
"description": "The command",
"type": "string"
},
"timeout": {
"description": "Timeout s (default 30, max 300)",
"type": "integer"
}
},
"required": [
"command"
],
"type": "object"
}
}
}
],
"temperature": 0.7,
"replies": [
{
"status": 200,
"lines": [
"data: {\"choices\":[{\"delta\":{\"tool_calls\":[{\"function\":{\"arguments\":\"{\\\"file\\\":\\\"b.txt\\\"}\",\"name\":\"read\"},\"id\":\"c1\",\"index\":0,\"type\":\"function\"}]}}]}",
"data: {\"choices\":[{\"delta\":{},\"finish_reason\":\"tool_calls\"}],\"usage\":{\"completion_tokens\":5,\"prompt_tokens\":100}}",
"data: [DONE]"
]
},
{
"status": 200,
"lines": [
"data: {\"choices\":[{\"delta\":{\"content\":\"Deux lignes.\"}}]}",
"data: {\"choices\":[{\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":{\"completion_tokens\":5,\"prompt_tokens\":100}}",
"data: [DONE]"
]
}
],
"tool_results": {
"bash": "a.txt\nb.txt",
"read": "ligne 1\nligne 2"
},
"expect": {
"requests": [
{
"messages": [
{
"content": "Tu es Loki.",
"role": "system"
},
{
"content": "Lis a.txt",
"role": "user"
},
{
"role": "assistant",
"tool_calls": [
{
"function": {
"arguments": "{\"file\":\"a.txt\"}",
"name": "read"
},
"id": "c0",
"type": "function"
}
]
},
{
"content": "ligne 1",
"role": "tool",
"tool_call_id": "c0"
},
{
"content": "Une ligne.",
"role": "assistant"
},
{
"content": "Et b.txt ?",
"role": "user"
}
],
"model": "loki",
"parallel_tool_calls": false,
"stream": true,
"stream_options": {
"include_usage": true
},
"temperature": 0.7,
"tools": [
{
"function": {
"description": "Read a file with 1-indexed line numbers (offset/limit for long files). ALWAYS use this instead of cat/type: output is bounded and reading a file is REQUIRED before you may edit or overwrite it.",
"name": "read",
"parameters": {
"properties": {
"file": {
"description": "Path (relative to the working folder)",
"type": "string"
},
"limit": {
"description": "Lines (default 400, max 1000)",
"type": "integer"
},
"offset": {
"description": "Start line (default 1)",
"type": "integer"
}
},
"required": [
"file"
],
"type": "object"
}
},
"type": "function"
},
{
"function": {
"description": "Run a shell command (bash syntax) and return stdout, stderr and exit code: inspect the system, read files and logs, run scripts. To CREATE or REWRITE a file use write instead — never echo/cat/python -c. Avoid destructive commands unless asked.",
"name": "bash",
"parameters": {
"properties": {
"command": {
"description": "The command",
"type": "string"
},
"timeout": {
"description": "Timeout s (default 30, max 300)",
"type": "integer"
}
},
"required": [
"command"
],
"type": "object"
}
},
"type": "function"
}
]
},
{
"messages": [
{
"content": "Tu es Loki.",
"role": "system"
},
{
"content": "Lis a.txt",
"role": "user"
},
{
"role": "assistant",
"tool_calls": [
{
"function": {
"arguments": "{\"file\":\"a.txt\"}",
"name": "read"
},
"id": "c0",
"type": "function"
}
]
},
{
"content": "ligne 1",
"role": "tool",
"tool_call_id": "c0"
},
{
"content": "Une ligne.",
"role": "assistant"
},
{
"content": "Et b.txt ?",
"role": "user"
},
{
"role": "assistant",
"tool_calls": [
{
"function": {
"arguments": "{\"file\":\"b.txt\"}",
"name": "read"
},
"id": "c1",
"type": "function"
}
]
},
{
"content": "ligne 1\nligne 2",
"role": "tool",
"tool_call_id": "c1"
}
],
"model": "loki",
"parallel_tool_calls": false,
"stream": true,
"stream_options": {
"include_usage": true
},
"temperature": 0.7,
"tools": [
{
"function": {
"description": "Read a file with 1-indexed line numbers (offset/limit for long files). ALWAYS use this instead of cat/type: output is bounded and reading a file is REQUIRED before you may edit or overwrite it.",
"name": "read",
"parameters": {
"properties": {
"file": {
"description": "Path (relative to the working folder)",
"type": "string"
},
"limit": {
"description": "Lines (default 400, max 1000)",
"type": "integer"
},
"offset": {
"description": "Start line (default 1)",
"type": "integer"
}
},
"required": [
"file"
],
"type": "object"
}
},
"type": "function"
},
{
"function": {
"description": "Run a shell command (bash syntax) and return stdout, stderr and exit code: inspect the system, read files and logs, run scripts. To CREATE or REWRITE a file use write instead — never echo/cat/python -c. Avoid destructive commands unless asked.",
"name": "bash",
"parameters": {
"properties": {
"command": {
"description": "The command",
"type": "string"
},
"timeout": {
"description": "Timeout s (default 30, max 300)",
"type": "integer"
}
},
"required": [
"command"
],
"type": "object"
}
},
"type": "function"
}
]
}
],
"events": [
{
"tool_used": {
"label": "b.txt",
"name": "read",
"typing": true
}
},
{
"tool_used": {
"label": "b.txt",
"name": "read"
}
},
{
"tool_used": {
"done": true,
"label": "b.txt",
"name": "read",
"result": "ligne 1\nligne 2",
"result_chars": 15
}
},
{
"content": "Deux lignes."
}
],
"extra": [
{
"role": "assistant",
"tool_calls": [
{
"id": "c1",
"type": "function",
"function": {
"name": "read",
"arguments": "{\"file\":\"b.txt\"}"
}
}
]
},
{
"role": "tool",
"content": "ligne 1\nligne 2",
"tool_call_id": "c1"
}
],
"err": ""
}
}
@@ -0,0 +1,292 @@
{
"name": "outil_inconnu",
"cfg": {},
"messages": [
{
"role": "system",
"content": "Tu es Loki."
},
{
"role": "user",
"content": "Fais-le"
}
],
"tools": [
{
"type": "function",
"function": {
"name": "read",
"description": "Read a file with 1-indexed line numbers (offset/limit for long files). ALWAYS use this instead of cat/type: output is bounded and reading a file is REQUIRED before you may edit or overwrite it.",
"parameters": {
"properties": {
"file": {
"description": "Path (relative to the working folder)",
"type": "string"
},
"limit": {
"description": "Lines (default 400, max 1000)",
"type": "integer"
},
"offset": {
"description": "Start line (default 1)",
"type": "integer"
}
},
"required": [
"file"
],
"type": "object"
}
}
},
{
"type": "function",
"function": {
"name": "bash",
"description": "Run a shell command (bash syntax) and return stdout, stderr and exit code: inspect the system, read files and logs, run scripts. To CREATE or REWRITE a file use write instead — never echo/cat/python -c. Avoid destructive commands unless asked.",
"parameters": {
"properties": {
"command": {
"description": "The command",
"type": "string"
},
"timeout": {
"description": "Timeout s (default 30, max 300)",
"type": "integer"
}
},
"required": [
"command"
],
"type": "object"
}
}
}
],
"temperature": 0.7,
"replies": [
{
"status": 200,
"lines": [
"data: {\"choices\":[{\"delta\":{\"tool_calls\":[{\"function\":{\"arguments\":\"{}\",\"name\":\"voler\"},\"id\":\"c1\",\"index\":0,\"type\":\"function\"}]}}]}",
"data: {\"choices\":[{\"delta\":{},\"finish_reason\":\"tool_calls\"}],\"usage\":{\"completion_tokens\":5,\"prompt_tokens\":100}}",
"data: [DONE]"
]
},
{
"status": 200,
"lines": [
"data: {\"choices\":[{\"delta\":{\"content\":\"Impossible.\"}}]}",
"data: {\"choices\":[{\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":{\"completion_tokens\":5,\"prompt_tokens\":100}}",
"data: [DONE]"
]
}
],
"tool_results": {
"bash": "a.txt\nb.txt",
"read": "ligne 1\nligne 2"
},
"expect": {
"requests": [
{
"messages": [
{
"content": "Tu es Loki.",
"role": "system"
},
{
"content": "Fais-le",
"role": "user"
}
],
"model": "loki",
"parallel_tool_calls": false,
"stream": true,
"stream_options": {
"include_usage": true
},
"temperature": 0.7,
"tools": [
{
"function": {
"description": "Read a file with 1-indexed line numbers (offset/limit for long files). ALWAYS use this instead of cat/type: output is bounded and reading a file is REQUIRED before you may edit or overwrite it.",
"name": "read",
"parameters": {
"properties": {
"file": {
"description": "Path (relative to the working folder)",
"type": "string"
},
"limit": {
"description": "Lines (default 400, max 1000)",
"type": "integer"
},
"offset": {
"description": "Start line (default 1)",
"type": "integer"
}
},
"required": [
"file"
],
"type": "object"
}
},
"type": "function"
},
{
"function": {
"description": "Run a shell command (bash syntax) and return stdout, stderr and exit code: inspect the system, read files and logs, run scripts. To CREATE or REWRITE a file use write instead — never echo/cat/python -c. Avoid destructive commands unless asked.",
"name": "bash",
"parameters": {
"properties": {
"command": {
"description": "The command",
"type": "string"
},
"timeout": {
"description": "Timeout s (default 30, max 300)",
"type": "integer"
}
},
"required": [
"command"
],
"type": "object"
}
},
"type": "function"
}
]
},
{
"messages": [
{
"content": "Tu es Loki.",
"role": "system"
},
{
"content": "Fais-le",
"role": "user"
},
{
"role": "assistant",
"tool_calls": [
{
"function": {
"arguments": "{}",
"name": "voler"
},
"id": "c1",
"type": "function"
}
]
},
{
"content": "[erreur] outil inconnu : voler",
"role": "tool",
"tool_call_id": "c1"
}
],
"model": "loki",
"parallel_tool_calls": false,
"stream": true,
"stream_options": {
"include_usage": true
},
"temperature": 0.7,
"tools": [
{
"function": {
"description": "Read a file with 1-indexed line numbers (offset/limit for long files). ALWAYS use this instead of cat/type: output is bounded and reading a file is REQUIRED before you may edit or overwrite it.",
"name": "read",
"parameters": {
"properties": {
"file": {
"description": "Path (relative to the working folder)",
"type": "string"
},
"limit": {
"description": "Lines (default 400, max 1000)",
"type": "integer"
},
"offset": {
"description": "Start line (default 1)",
"type": "integer"
}
},
"required": [
"file"
],
"type": "object"
}
},
"type": "function"
},
{
"function": {
"description": "Run a shell command (bash syntax) and return stdout, stderr and exit code: inspect the system, read files and logs, run scripts. To CREATE or REWRITE a file use write instead — never echo/cat/python -c. Avoid destructive commands unless asked.",
"name": "bash",
"parameters": {
"properties": {
"command": {
"description": "The command",
"type": "string"
},
"timeout": {
"description": "Timeout s (default 30, max 300)",
"type": "integer"
}
},
"required": [
"command"
],
"type": "object"
}
},
"type": "function"
}
]
}
],
"events": [
{
"tool_used": {
"name": "voler"
}
},
{
"tool_used": {
"done": true,
"name": "voler",
"result": "[erreur] outil inconnu : voler",
"result_chars": 30
}
},
{
"content": "Impossible."
}
],
"extra": [
{
"role": "assistant",
"tool_calls": [
{
"id": "c1",
"type": "function",
"function": {
"name": "voler",
"arguments": "{}"
}
}
]
},
{
"role": "tool",
"content": "[erreur] outil inconnu : voler",
"tool_call_id": "c1"
}
],
"err": ""
}
}
@@ -0,0 +1,301 @@
{
"name": "outil_puis_reponse",
"cfg": {},
"messages": [
{
"role": "system",
"content": "Tu es Loki."
},
{
"role": "user",
"content": "Lis a.txt"
}
],
"tools": [
{
"type": "function",
"function": {
"name": "read",
"description": "Read a file with 1-indexed line numbers (offset/limit for long files). ALWAYS use this instead of cat/type: output is bounded and reading a file is REQUIRED before you may edit or overwrite it.",
"parameters": {
"properties": {
"file": {
"description": "Path (relative to the working folder)",
"type": "string"
},
"limit": {
"description": "Lines (default 400, max 1000)",
"type": "integer"
},
"offset": {
"description": "Start line (default 1)",
"type": "integer"
}
},
"required": [
"file"
],
"type": "object"
}
}
},
{
"type": "function",
"function": {
"name": "bash",
"description": "Run a shell command (bash syntax) and return stdout, stderr and exit code: inspect the system, read files and logs, run scripts. To CREATE or REWRITE a file use write instead — never echo/cat/python -c. Avoid destructive commands unless asked.",
"parameters": {
"properties": {
"command": {
"description": "The command",
"type": "string"
},
"timeout": {
"description": "Timeout s (default 30, max 300)",
"type": "integer"
}
},
"required": [
"command"
],
"type": "object"
}
}
}
],
"temperature": 0.7,
"replies": [
{
"status": 200,
"lines": [
"data: {\"choices\":[{\"delta\":{\"tool_calls\":[{\"function\":{\"arguments\":\"{\\\"file\\\":\\\"a.txt\\\"}\",\"name\":\"read\"},\"id\":\"c1\",\"index\":0,\"type\":\"function\"}]}}]}",
"data: {\"choices\":[{\"delta\":{},\"finish_reason\":\"tool_calls\"}],\"usage\":{\"completion_tokens\":5,\"prompt_tokens\":100}}",
"data: [DONE]"
]
},
{
"status": 200,
"lines": [
"data: {\"choices\":[{\"delta\":{\"content\":\"Le fichier a deux lignes.\"}}]}",
"data: {\"choices\":[{\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":{\"completion_tokens\":5,\"prompt_tokens\":100}}",
"data: [DONE]"
]
}
],
"tool_results": {
"bash": "a.txt\nb.txt",
"read": "ligne 1\nligne 2"
},
"expect": {
"requests": [
{
"messages": [
{
"content": "Tu es Loki.",
"role": "system"
},
{
"content": "Lis a.txt",
"role": "user"
}
],
"model": "loki",
"parallel_tool_calls": false,
"stream": true,
"stream_options": {
"include_usage": true
},
"temperature": 0.7,
"tools": [
{
"function": {
"description": "Read a file with 1-indexed line numbers (offset/limit for long files). ALWAYS use this instead of cat/type: output is bounded and reading a file is REQUIRED before you may edit or overwrite it.",
"name": "read",
"parameters": {
"properties": {
"file": {
"description": "Path (relative to the working folder)",
"type": "string"
},
"limit": {
"description": "Lines (default 400, max 1000)",
"type": "integer"
},
"offset": {
"description": "Start line (default 1)",
"type": "integer"
}
},
"required": [
"file"
],
"type": "object"
}
},
"type": "function"
},
{
"function": {
"description": "Run a shell command (bash syntax) and return stdout, stderr and exit code: inspect the system, read files and logs, run scripts. To CREATE or REWRITE a file use write instead — never echo/cat/python -c. Avoid destructive commands unless asked.",
"name": "bash",
"parameters": {
"properties": {
"command": {
"description": "The command",
"type": "string"
},
"timeout": {
"description": "Timeout s (default 30, max 300)",
"type": "integer"
}
},
"required": [
"command"
],
"type": "object"
}
},
"type": "function"
}
]
},
{
"messages": [
{
"content": "Tu es Loki.",
"role": "system"
},
{
"content": "Lis a.txt",
"role": "user"
},
{
"role": "assistant",
"tool_calls": [
{
"function": {
"arguments": "{\"file\":\"a.txt\"}",
"name": "read"
},
"id": "c1",
"type": "function"
}
]
},
{
"content": "ligne 1\nligne 2",
"role": "tool",
"tool_call_id": "c1"
}
],
"model": "loki",
"parallel_tool_calls": false,
"stream": true,
"stream_options": {
"include_usage": true
},
"temperature": 0.7,
"tools": [
{
"function": {
"description": "Read a file with 1-indexed line numbers (offset/limit for long files). ALWAYS use this instead of cat/type: output is bounded and reading a file is REQUIRED before you may edit or overwrite it.",
"name": "read",
"parameters": {
"properties": {
"file": {
"description": "Path (relative to the working folder)",
"type": "string"
},
"limit": {
"description": "Lines (default 400, max 1000)",
"type": "integer"
},
"offset": {
"description": "Start line (default 1)",
"type": "integer"
}
},
"required": [
"file"
],
"type": "object"
}
},
"type": "function"
},
{
"function": {
"description": "Run a shell command (bash syntax) and return stdout, stderr and exit code: inspect the system, read files and logs, run scripts. To CREATE or REWRITE a file use write instead — never echo/cat/python -c. Avoid destructive commands unless asked.",
"name": "bash",
"parameters": {
"properties": {
"command": {
"description": "The command",
"type": "string"
},
"timeout": {
"description": "Timeout s (default 30, max 300)",
"type": "integer"
}
},
"required": [
"command"
],
"type": "object"
}
},
"type": "function"
}
]
}
],
"events": [
{
"tool_used": {
"label": "a.txt",
"name": "read",
"typing": true
}
},
{
"tool_used": {
"label": "a.txt",
"name": "read"
}
},
{
"tool_used": {
"done": true,
"label": "a.txt",
"name": "read",
"result": "ligne 1\nligne 2",
"result_chars": 15
}
},
{
"content": "Le fichier a deux lignes."
}
],
"extra": [
{
"role": "assistant",
"tool_calls": [
{
"id": "c1",
"type": "function",
"function": {
"name": "read",
"arguments": "{\"file\":\"a.txt\"}"
}
}
]
},
{
"role": "tool",
"content": "ligne 1\nligne 2",
"tool_call_id": "c1"
}
],
"err": ""
}
}
@@ -0,0 +1,252 @@
{
"name": "pense_sans_agir",
"cfg": {},
"messages": [
{
"role": "system",
"content": "Tu es Loki."
},
{
"role": "user",
"content": "Cherche"
}
],
"tools": [
{
"type": "function",
"function": {
"name": "read",
"description": "Read a file with 1-indexed line numbers (offset/limit for long files). ALWAYS use this instead of cat/type: output is bounded and reading a file is REQUIRED before you may edit or overwrite it.",
"parameters": {
"properties": {
"file": {
"description": "Path (relative to the working folder)",
"type": "string"
},
"limit": {
"description": "Lines (default 400, max 1000)",
"type": "integer"
},
"offset": {
"description": "Start line (default 1)",
"type": "integer"
}
},
"required": [
"file"
],
"type": "object"
}
}
},
{
"type": "function",
"function": {
"name": "bash",
"description": "Run a shell command (bash syntax) and return stdout, stderr and exit code: inspect the system, read files and logs, run scripts. To CREATE or REWRITE a file use write instead — never echo/cat/python -c. Avoid destructive commands unless asked.",
"parameters": {
"properties": {
"command": {
"description": "The command",
"type": "string"
},
"timeout": {
"description": "Timeout s (default 30, max 300)",
"type": "integer"
}
},
"required": [
"command"
],
"type": "object"
}
}
}
],
"temperature": 0.7,
"replies": [
{
"status": 200,
"lines": [
"data: {\"choices\":[{\"delta\":{\"reasoning_content\":\"Il faudrait lister les fichiers.\"}}]}",
"data: {\"choices\":[{\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":{\"completion_tokens\":5,\"prompt_tokens\":100}}",
"data: [DONE]"
]
},
{
"status": 200,
"lines": [
"data: {\"choices\":[{\"delta\":{\"content\":\"Voilà.\"}}]}",
"data: {\"choices\":[{\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":{\"completion_tokens\":5,\"prompt_tokens\":100}}",
"data: [DONE]"
]
}
],
"tool_results": {
"bash": "a.txt\nb.txt",
"read": "ligne 1\nligne 2"
},
"expect": {
"requests": [
{
"messages": [
{
"content": "Tu es Loki.",
"role": "system"
},
{
"content": "Cherche",
"role": "user"
}
],
"model": "loki",
"parallel_tool_calls": false,
"stream": true,
"stream_options": {
"include_usage": true
},
"temperature": 0.7,
"tools": [
{
"function": {
"description": "Read a file with 1-indexed line numbers (offset/limit for long files). ALWAYS use this instead of cat/type: output is bounded and reading a file is REQUIRED before you may edit or overwrite it.",
"name": "read",
"parameters": {
"properties": {
"file": {
"description": "Path (relative to the working folder)",
"type": "string"
},
"limit": {
"description": "Lines (default 400, max 1000)",
"type": "integer"
},
"offset": {
"description": "Start line (default 1)",
"type": "integer"
}
},
"required": [
"file"
],
"type": "object"
}
},
"type": "function"
},
{
"function": {
"description": "Run a shell command (bash syntax) and return stdout, stderr and exit code: inspect the system, read files and logs, run scripts. To CREATE or REWRITE a file use write instead — never echo/cat/python -c. Avoid destructive commands unless asked.",
"name": "bash",
"parameters": {
"properties": {
"command": {
"description": "The command",
"type": "string"
},
"timeout": {
"description": "Timeout s (default 30, max 300)",
"type": "integer"
}
},
"required": [
"command"
],
"type": "object"
}
},
"type": "function"
}
]
},
{
"messages": [
{
"content": "Tu es Loki.",
"role": "system"
},
{
"content": "Cherche",
"role": "user"
},
{
"content": "You reasoned but did not call a tool or answer. Act NOW: call the appropriate tool directly (e.g. mem_search/mem_read/bash), or give your final answer if you already have the info. Don't explain, act.",
"role": "user"
}
],
"model": "loki",
"parallel_tool_calls": false,
"stream": true,
"stream_options": {
"include_usage": true
},
"temperature": 0.7,
"tools": [
{
"function": {
"description": "Read a file with 1-indexed line numbers (offset/limit for long files). ALWAYS use this instead of cat/type: output is bounded and reading a file is REQUIRED before you may edit or overwrite it.",
"name": "read",
"parameters": {
"properties": {
"file": {
"description": "Path (relative to the working folder)",
"type": "string"
},
"limit": {
"description": "Lines (default 400, max 1000)",
"type": "integer"
},
"offset": {
"description": "Start line (default 1)",
"type": "integer"
}
},
"required": [
"file"
],
"type": "object"
}
},
"type": "function"
},
{
"function": {
"description": "Run a shell command (bash syntax) and return stdout, stderr and exit code: inspect the system, read files and logs, run scripts. To CREATE or REWRITE a file use write instead — never echo/cat/python -c. Avoid destructive commands unless asked.",
"name": "bash",
"parameters": {
"properties": {
"command": {
"description": "The command",
"type": "string"
},
"timeout": {
"description": "Timeout s (default 30, max 300)",
"type": "integer"
}
},
"required": [
"command"
],
"type": "object"
}
},
"type": "function"
}
]
}
],
"events": [
{
"reasoning": "Il faudrait lister les fichiers."
},
{
"drop_reasoning": true
},
{
"content": "Voilà."
}
],
"extra": [],
"err": ""
}
}
@@ -0,0 +1,345 @@
{
"name": "pense_sans_agir_deux_fois",
"cfg": {},
"messages": [
{
"role": "system",
"content": "Tu es Loki."
},
{
"role": "user",
"content": "Cherche"
}
],
"tools": [
{
"type": "function",
"function": {
"name": "read",
"description": "Read a file with 1-indexed line numbers (offset/limit for long files). ALWAYS use this instead of cat/type: output is bounded and reading a file is REQUIRED before you may edit or overwrite it.",
"parameters": {
"properties": {
"file": {
"description": "Path (relative to the working folder)",
"type": "string"
},
"limit": {
"description": "Lines (default 400, max 1000)",
"type": "integer"
},
"offset": {
"description": "Start line (default 1)",
"type": "integer"
}
},
"required": [
"file"
],
"type": "object"
}
}
},
{
"type": "function",
"function": {
"name": "bash",
"description": "Run a shell command (bash syntax) and return stdout, stderr and exit code: inspect the system, read files and logs, run scripts. To CREATE or REWRITE a file use write instead — never echo/cat/python -c. Avoid destructive commands unless asked.",
"parameters": {
"properties": {
"command": {
"description": "The command",
"type": "string"
},
"timeout": {
"description": "Timeout s (default 30, max 300)",
"type": "integer"
}
},
"required": [
"command"
],
"type": "object"
}
}
}
],
"temperature": 0.7,
"replies": [
{
"status": 200,
"lines": [
"data: {\"choices\":[{\"delta\":{\"reasoning_content\":\"Lister les fichiers.\"}}]}",
"data: {\"choices\":[{\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":{\"completion_tokens\":5,\"prompt_tokens\":100}}",
"data: [DONE]"
]
},
{
"status": 200,
"lines": [
"data: {\"choices\":[{\"delta\":{\"reasoning_content\":\"Toujours lister.\"}}]}",
"data: {\"choices\":[{\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":{\"completion_tokens\":5,\"prompt_tokens\":100}}",
"data: [DONE]"
]
},
{
"status": 200,
"lines": [
"data: {\"choices\":[{\"delta\":{\"content\":\"Voilà.\"}}]}",
"data: {\"choices\":[{\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":{\"completion_tokens\":5,\"prompt_tokens\":100}}",
"data: [DONE]"
]
}
],
"tool_results": {
"bash": "a.txt\nb.txt",
"read": "ligne 1\nligne 2"
},
"expect": {
"requests": [
{
"messages": [
{
"content": "Tu es Loki.",
"role": "system"
},
{
"content": "Cherche",
"role": "user"
}
],
"model": "loki",
"parallel_tool_calls": false,
"stream": true,
"stream_options": {
"include_usage": true
},
"temperature": 0.7,
"tools": [
{
"function": {
"description": "Read a file with 1-indexed line numbers (offset/limit for long files). ALWAYS use this instead of cat/type: output is bounded and reading a file is REQUIRED before you may edit or overwrite it.",
"name": "read",
"parameters": {
"properties": {
"file": {
"description": "Path (relative to the working folder)",
"type": "string"
},
"limit": {
"description": "Lines (default 400, max 1000)",
"type": "integer"
},
"offset": {
"description": "Start line (default 1)",
"type": "integer"
}
},
"required": [
"file"
],
"type": "object"
}
},
"type": "function"
},
{
"function": {
"description": "Run a shell command (bash syntax) and return stdout, stderr and exit code: inspect the system, read files and logs, run scripts. To CREATE or REWRITE a file use write instead — never echo/cat/python -c. Avoid destructive commands unless asked.",
"name": "bash",
"parameters": {
"properties": {
"command": {
"description": "The command",
"type": "string"
},
"timeout": {
"description": "Timeout s (default 30, max 300)",
"type": "integer"
}
},
"required": [
"command"
],
"type": "object"
}
},
"type": "function"
}
]
},
{
"messages": [
{
"content": "Tu es Loki.",
"role": "system"
},
{
"content": "Cherche",
"role": "user"
},
{
"content": "You reasoned but did not call a tool or answer. Act NOW: call the appropriate tool directly (e.g. mem_search/mem_read/bash), or give your final answer if you already have the info. Don't explain, act.",
"role": "user"
}
],
"model": "loki",
"parallel_tool_calls": false,
"stream": true,
"stream_options": {
"include_usage": true
},
"temperature": 0.7,
"tools": [
{
"function": {
"description": "Read a file with 1-indexed line numbers (offset/limit for long files). ALWAYS use this instead of cat/type: output is bounded and reading a file is REQUIRED before you may edit or overwrite it.",
"name": "read",
"parameters": {
"properties": {
"file": {
"description": "Path (relative to the working folder)",
"type": "string"
},
"limit": {
"description": "Lines (default 400, max 1000)",
"type": "integer"
},
"offset": {
"description": "Start line (default 1)",
"type": "integer"
}
},
"required": [
"file"
],
"type": "object"
}
},
"type": "function"
},
{
"function": {
"description": "Run a shell command (bash syntax) and return stdout, stderr and exit code: inspect the system, read files and logs, run scripts. To CREATE or REWRITE a file use write instead — never echo/cat/python -c. Avoid destructive commands unless asked.",
"name": "bash",
"parameters": {
"properties": {
"command": {
"description": "The command",
"type": "string"
},
"timeout": {
"description": "Timeout s (default 30, max 300)",
"type": "integer"
}
},
"required": [
"command"
],
"type": "object"
}
},
"type": "function"
}
]
},
{
"messages": [
{
"content": "Tu es Loki.",
"role": "system"
},
{
"content": "Cherche",
"role": "user"
},
{
"content": "You reasoned but did not call a tool or answer. Act NOW: call the appropriate tool directly (e.g. mem_search/mem_read/bash), or give your final answer if you already have the info. Don't explain, act.",
"role": "user"
},
{
"content": "You are stuck re-describing the same plan without executing it. Stop reasoning. In your NEXT message, either call ONE tool right now, or write your final answer in plain text using only what you already know — no more planning, no more thinking, act or answer this instant.",
"role": "user"
}
],
"model": "loki",
"parallel_tool_calls": false,
"stream": true,
"stream_options": {
"include_usage": true
},
"temperature": 0.7,
"tools": [
{
"function": {
"description": "Read a file with 1-indexed line numbers (offset/limit for long files). ALWAYS use this instead of cat/type: output is bounded and reading a file is REQUIRED before you may edit or overwrite it.",
"name": "read",
"parameters": {
"properties": {
"file": {
"description": "Path (relative to the working folder)",
"type": "string"
},
"limit": {
"description": "Lines (default 400, max 1000)",
"type": "integer"
},
"offset": {
"description": "Start line (default 1)",
"type": "integer"
}
},
"required": [
"file"
],
"type": "object"
}
},
"type": "function"
},
{
"function": {
"description": "Run a shell command (bash syntax) and return stdout, stderr and exit code: inspect the system, read files and logs, run scripts. To CREATE or REWRITE a file use write instead — never echo/cat/python -c. Avoid destructive commands unless asked.",
"name": "bash",
"parameters": {
"properties": {
"command": {
"description": "The command",
"type": "string"
},
"timeout": {
"description": "Timeout s (default 30, max 300)",
"type": "integer"
}
},
"required": [
"command"
],
"type": "object"
}
},
"type": "function"
}
]
}
],
"events": [
{
"reasoning": "Lister les fichiers."
},
{
"drop_reasoning": true
},
{
"reasoning": "Toujours lister."
},
{
"drop_reasoning": true
},
{
"content": "Voilà."
}
],
"extra": [],
"err": ""
}
}
@@ -0,0 +1,172 @@
{
"name": "pensee_en_ligne",
"cfg": {
"REASONING": "on"
},
"messages": [
{
"role": "system",
"content": "Tu es Loki."
},
{
"role": "user",
"content": "Salut"
}
],
"tools": [
{
"type": "function",
"function": {
"name": "read",
"description": "Read a file with 1-indexed line numbers (offset/limit for long files). ALWAYS use this instead of cat/type: output is bounded and reading a file is REQUIRED before you may edit or overwrite it.",
"parameters": {
"properties": {
"file": {
"description": "Path (relative to the working folder)",
"type": "string"
},
"limit": {
"description": "Lines (default 400, max 1000)",
"type": "integer"
},
"offset": {
"description": "Start line (default 1)",
"type": "integer"
}
},
"required": [
"file"
],
"type": "object"
}
}
},
{
"type": "function",
"function": {
"name": "bash",
"description": "Run a shell command (bash syntax) and return stdout, stderr and exit code: inspect the system, read files and logs, run scripts. To CREATE or REWRITE a file use write instead — never echo/cat/python -c. Avoid destructive commands unless asked.",
"parameters": {
"properties": {
"command": {
"description": "The command",
"type": "string"
},
"timeout": {
"description": "Timeout s (default 30, max 300)",
"type": "integer"
}
},
"required": [
"command"
],
"type": "object"
}
}
}
],
"temperature": 0.7,
"replies": [
{
"status": 200,
"lines": [
"data: {\"choices\":[{\"delta\":{\"content\":\"\\u003cthink\\u003eIl dit bonjour.\"}}]}",
"data: {\"choices\":[{\"delta\":{\"content\":\"\\u003c/think\\u003eBonjour !\"}}]}",
"data: {\"choices\":[{\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":{\"completion_tokens\":5,\"prompt_tokens\":100}}",
"data: [DONE]"
]
}
],
"tool_results": {
"bash": "a.txt\nb.txt",
"read": "ligne 1\nligne 2"
},
"expect": {
"requests": [
{
"messages": [
{
"content": "Tu es Loki.",
"role": "system"
},
{
"content": "Salut",
"role": "user"
}
],
"model": "loki",
"parallel_tool_calls": false,
"stream": true,
"stream_options": {
"include_usage": true
},
"temperature": 0.7,
"tools": [
{
"function": {
"description": "Read a file with 1-indexed line numbers (offset/limit for long files). ALWAYS use this instead of cat/type: output is bounded and reading a file is REQUIRED before you may edit or overwrite it.",
"name": "read",
"parameters": {
"properties": {
"file": {
"description": "Path (relative to the working folder)",
"type": "string"
},
"limit": {
"description": "Lines (default 400, max 1000)",
"type": "integer"
},
"offset": {
"description": "Start line (default 1)",
"type": "integer"
}
},
"required": [
"file"
],
"type": "object"
}
},
"type": "function"
},
{
"function": {
"description": "Run a shell command (bash syntax) and return stdout, stderr and exit code: inspect the system, read files and logs, run scripts. To CREATE or REWRITE a file use write instead — never echo/cat/python -c. Avoid destructive commands unless asked.",
"name": "bash",
"parameters": {
"properties": {
"command": {
"description": "The command",
"type": "string"
},
"timeout": {
"description": "Timeout s (default 30, max 300)",
"type": "integer"
}
},
"required": [
"command"
],
"type": "object"
}
},
"type": "function"
}
]
}
],
"events": [
{
"content": "<think>Il dit b"
},
{
"reasoning": "onjour."
},
{
"content": "Bonjour !"
}
],
"extra": [],
"err": ""
}
}
@@ -0,0 +1,168 @@
{
"name": "raisonnement_coupe",
"cfg": {
"REASONING": "off"
},
"messages": [
{
"role": "system",
"content": "Tu es Loki."
},
{
"role": "user",
"content": "Salut"
}
],
"tools": [
{
"type": "function",
"function": {
"name": "read",
"description": "Read a file with 1-indexed line numbers (offset/limit for long files). ALWAYS use this instead of cat/type: output is bounded and reading a file is REQUIRED before you may edit or overwrite it.",
"parameters": {
"properties": {
"file": {
"description": "Path (relative to the working folder)",
"type": "string"
},
"limit": {
"description": "Lines (default 400, max 1000)",
"type": "integer"
},
"offset": {
"description": "Start line (default 1)",
"type": "integer"
}
},
"required": [
"file"
],
"type": "object"
}
}
},
{
"type": "function",
"function": {
"name": "bash",
"description": "Run a shell command (bash syntax) and return stdout, stderr and exit code: inspect the system, read files and logs, run scripts. To CREATE or REWRITE a file use write instead — never echo/cat/python -c. Avoid destructive commands unless asked.",
"parameters": {
"properties": {
"command": {
"description": "The command",
"type": "string"
},
"timeout": {
"description": "Timeout s (default 30, max 300)",
"type": "integer"
}
},
"required": [
"command"
],
"type": "object"
}
}
}
],
"temperature": 0.7,
"replies": [
{
"status": 200,
"lines": [
"data: {\"choices\":[{\"delta\":{\"content\":\"Bonjour.\"}}]}",
"data: {\"choices\":[{\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":{\"completion_tokens\":5,\"prompt_tokens\":100}}",
"data: [DONE]"
]
}
],
"tool_results": {
"bash": "a.txt\nb.txt",
"read": "ligne 1\nligne 2"
},
"expect": {
"requests": [
{
"chat_template_kwargs": {
"enable_thinking": false
},
"messages": [
{
"content": "Tu es Loki.",
"role": "system"
},
{
"content": "Salut",
"role": "user"
}
],
"model": "loki",
"parallel_tool_calls": false,
"stream": true,
"stream_options": {
"include_usage": true
},
"temperature": 0.7,
"tools": [
{
"function": {
"description": "Read a file with 1-indexed line numbers (offset/limit for long files). ALWAYS use this instead of cat/type: output is bounded and reading a file is REQUIRED before you may edit or overwrite it.",
"name": "read",
"parameters": {
"properties": {
"file": {
"description": "Path (relative to the working folder)",
"type": "string"
},
"limit": {
"description": "Lines (default 400, max 1000)",
"type": "integer"
},
"offset": {
"description": "Start line (default 1)",
"type": "integer"
}
},
"required": [
"file"
],
"type": "object"
}
},
"type": "function"
},
{
"function": {
"description": "Run a shell command (bash syntax) and return stdout, stderr and exit code: inspect the system, read files and logs, run scripts. To CREATE or REWRITE a file use write instead — never echo/cat/python -c. Avoid destructive commands unless asked.",
"name": "bash",
"parameters": {
"properties": {
"command": {
"description": "The command",
"type": "string"
},
"timeout": {
"description": "Timeout s (default 30, max 300)",
"type": "integer"
}
},
"required": [
"command"
],
"type": "object"
}
},
"type": "function"
}
]
}
],
"events": [
{
"content": "Bonjour."
}
],
"extra": [],
"err": ""
}
}
@@ -0,0 +1,168 @@
{
"name": "raisonnement_puis_reponse",
"cfg": {},
"messages": [
{
"role": "system",
"content": "Tu es Loki."
},
{
"role": "user",
"content": "Combien font 2+2 ?"
}
],
"tools": [
{
"type": "function",
"function": {
"name": "read",
"description": "Read a file with 1-indexed line numbers (offset/limit for long files). ALWAYS use this instead of cat/type: output is bounded and reading a file is REQUIRED before you may edit or overwrite it.",
"parameters": {
"properties": {
"file": {
"description": "Path (relative to the working folder)",
"type": "string"
},
"limit": {
"description": "Lines (default 400, max 1000)",
"type": "integer"
},
"offset": {
"description": "Start line (default 1)",
"type": "integer"
}
},
"required": [
"file"
],
"type": "object"
}
}
},
{
"type": "function",
"function": {
"name": "bash",
"description": "Run a shell command (bash syntax) and return stdout, stderr and exit code: inspect the system, read files and logs, run scripts. To CREATE or REWRITE a file use write instead — never echo/cat/python -c. Avoid destructive commands unless asked.",
"parameters": {
"properties": {
"command": {
"description": "The command",
"type": "string"
},
"timeout": {
"description": "Timeout s (default 30, max 300)",
"type": "integer"
}
},
"required": [
"command"
],
"type": "object"
}
}
}
],
"temperature": 0.7,
"replies": [
{
"status": 200,
"lines": [
"data: {\"choices\":[{\"delta\":{\"reasoning_content\":\"Je calcule.\"}}]}",
"data: {\"choices\":[{\"delta\":{\"reasoning_content\":\" 4.\"}}]}",
"data: {\"choices\":[{\"delta\":{\"content\":\"4\"}}]}",
"data: {\"choices\":[{\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":{\"completion_tokens\":5,\"prompt_tokens\":100}}",
"data: [DONE]"
]
}
],
"tool_results": {
"bash": "a.txt\nb.txt",
"read": "ligne 1\nligne 2"
},
"expect": {
"requests": [
{
"messages": [
{
"content": "Tu es Loki.",
"role": "system"
},
{
"content": "Combien font 2+2 ?",
"role": "user"
}
],
"model": "loki",
"parallel_tool_calls": false,
"stream": true,
"stream_options": {
"include_usage": true
},
"temperature": 0.7,
"tools": [
{
"function": {
"description": "Read a file with 1-indexed line numbers (offset/limit for long files). ALWAYS use this instead of cat/type: output is bounded and reading a file is REQUIRED before you may edit or overwrite it.",
"name": "read",
"parameters": {
"properties": {
"file": {
"description": "Path (relative to the working folder)",
"type": "string"
},
"limit": {
"description": "Lines (default 400, max 1000)",
"type": "integer"
},
"offset": {
"description": "Start line (default 1)",
"type": "integer"
}
},
"required": [
"file"
],
"type": "object"
}
},
"type": "function"
},
{
"function": {
"description": "Run a shell command (bash syntax) and return stdout, stderr and exit code: inspect the system, read files and logs, run scripts. To CREATE or REWRITE a file use write instead — never echo/cat/python -c. Avoid destructive commands unless asked.",
"name": "bash",
"parameters": {
"properties": {
"command": {
"description": "The command",
"type": "string"
},
"timeout": {
"description": "Timeout s (default 30, max 300)",
"type": "integer"
}
},
"required": [
"command"
],
"type": "object"
}
},
"type": "function"
}
]
}
],
"events": [
{
"reasoning": "Je calcule. 4."
},
{
"content": "4"
}
],
"extra": [],
"err": ""
}
}
@@ -0,0 +1,164 @@
{
"name": "reponse_simple",
"cfg": {},
"messages": [
{
"role": "system",
"content": "Tu es Loki."
},
{
"role": "user",
"content": "Bonjour"
}
],
"tools": [
{
"type": "function",
"function": {
"name": "read",
"description": "Read a file with 1-indexed line numbers (offset/limit for long files). ALWAYS use this instead of cat/type: output is bounded and reading a file is REQUIRED before you may edit or overwrite it.",
"parameters": {
"properties": {
"file": {
"description": "Path (relative to the working folder)",
"type": "string"
},
"limit": {
"description": "Lines (default 400, max 1000)",
"type": "integer"
},
"offset": {
"description": "Start line (default 1)",
"type": "integer"
}
},
"required": [
"file"
],
"type": "object"
}
}
},
{
"type": "function",
"function": {
"name": "bash",
"description": "Run a shell command (bash syntax) and return stdout, stderr and exit code: inspect the system, read files and logs, run scripts. To CREATE or REWRITE a file use write instead — never echo/cat/python -c. Avoid destructive commands unless asked.",
"parameters": {
"properties": {
"command": {
"description": "The command",
"type": "string"
},
"timeout": {
"description": "Timeout s (default 30, max 300)",
"type": "integer"
}
},
"required": [
"command"
],
"type": "object"
}
}
}
],
"temperature": 0.7,
"replies": [
{
"status": 200,
"lines": [
"data: {\"choices\":[{\"delta\":{\"content\":\"Bon\"}}]}",
"data: {\"choices\":[{\"delta\":{\"content\":\"jour !\"}}]}",
"data: {\"choices\":[{\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":{\"completion_tokens\":5,\"prompt_tokens\":100}}",
"data: [DONE]"
]
}
],
"tool_results": {
"bash": "a.txt\nb.txt",
"read": "ligne 1\nligne 2"
},
"expect": {
"requests": [
{
"messages": [
{
"content": "Tu es Loki.",
"role": "system"
},
{
"content": "Bonjour",
"role": "user"
}
],
"model": "loki",
"parallel_tool_calls": false,
"stream": true,
"stream_options": {
"include_usage": true
},
"temperature": 0.7,
"tools": [
{
"function": {
"description": "Read a file with 1-indexed line numbers (offset/limit for long files). ALWAYS use this instead of cat/type: output is bounded and reading a file is REQUIRED before you may edit or overwrite it.",
"name": "read",
"parameters": {
"properties": {
"file": {
"description": "Path (relative to the working folder)",
"type": "string"
},
"limit": {
"description": "Lines (default 400, max 1000)",
"type": "integer"
},
"offset": {
"description": "Start line (default 1)",
"type": "integer"
}
},
"required": [
"file"
],
"type": "object"
}
},
"type": "function"
},
{
"function": {
"description": "Run a shell command (bash syntax) and return stdout, stderr and exit code: inspect the system, read files and logs, run scripts. To CREATE or REWRITE a file use write instead — never echo/cat/python -c. Avoid destructive commands unless asked.",
"name": "bash",
"parameters": {
"properties": {
"command": {
"description": "The command",
"type": "string"
},
"timeout": {
"description": "Timeout s (default 30, max 300)",
"type": "integer"
}
},
"required": [
"command"
],
"type": "object"
}
},
"type": "function"
}
]
}
],
"events": [
{
"content": "Bonjour !"
}
],
"extra": [],
"err": ""
}
}