docstring

This commit is contained in:
Ahmed Ibrahim
2025-07-12 16:19:54 -07:00
parent 3168d214e1
commit 3d85eabff9
2 changed files with 7 additions and 1 deletions

View File

@@ -500,7 +500,7 @@ mod tests {
/// Validate that `stream_chat_completions` converts our internal `Prompt` into the exact
/// Chat Completions JSON payload expected by OpenAI. We build a prompt containing user
////assistant turns, a function call and its output, issue the request against a
/// assistant turns, a function call and its output, issue the request against a
/// `wiremock::MockServer`, capture the JSON body, and assert that the full `messages` array
/// matches a golden value. The test is a pure unit-test; it is skipped automatically when
/// the sandbox disables networking.

View File

@@ -207,6 +207,9 @@ mod tests {
assert_eq!(dummy, &expected_dummy);
}
/// When the model name starts with `codex-`, the built-in shell tool should be encoded
/// as `local_shell` rather than `shell`. Verify that the first tool in the JSON list has
/// the adjusted type in that scenario.
#[test]
fn responses_codex_model_uses_local_shell() {
let mut prompt = Prompt::default();
@@ -217,6 +220,9 @@ mod tests {
assert_eq!(tools[0]["type"], "local_shell");
}
/// Chat-Completions API expects the V2 tool schema (`{"type":"function","function":{..}}`).
/// Confirm that every entry is shaped accordingly and the wrapper does not leak the internal
/// `type` field inside the nested `function` object.
#[test]
fn chat_completions_tool_format() {
let mut prompt = Prompt::default();