mirror of
https://github.com/openai/codex.git
synced 2026-10-21 07:42:01 +00:00
Fix tests compile warnings
This commit is contained in:
@@ -467,16 +467,11 @@ impl<T> AggregateStreamExt for T where T: Stream<Item = Result<ResponseEvent>> +
|
||||
mod tests {
|
||||
#![allow(clippy::unwrap_used)]
|
||||
|
||||
use super::super::client::ModelClient;
|
||||
use super::*;
|
||||
use crate::config::{Config, ConfigOverrides, ConfigToml};
|
||||
use crate::config_types::{
|
||||
ReasoningEffort as ReasoningEffortConfig, ReasoningSummary as ReasoningSummaryConfig,
|
||||
};
|
||||
use crate::{ModelProviderInfo, WireApi};
|
||||
use mockito::Server;
|
||||
use once_cell::sync::Lazy;
|
||||
use reqwest;
|
||||
use serde_json::Value;
|
||||
use std::sync::Mutex;
|
||||
|
||||
|
||||
@@ -179,9 +179,11 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn responses_api_includes_default_and_extra_tools() {
|
||||
let mut prompt = Prompt::default();
|
||||
prompt.extra_tools = hashmap! {
|
||||
"srv/echo".into() => sample_tool(),
|
||||
let prompt = Prompt {
|
||||
extra_tools: hashmap! {
|
||||
"srv/echo".into() => sample_tool(),
|
||||
},
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
let tools = create_tools_json_for_responses_api(&prompt, "gpt-4").unwrap();
|
||||
@@ -208,9 +210,11 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn chat_api_tools_are_wrapped_correctly() {
|
||||
let mut prompt = Prompt::default();
|
||||
prompt.extra_tools = hashmap! {
|
||||
"srv/echo".into() => sample_tool(),
|
||||
let prompt = Prompt {
|
||||
extra_tools: hashmap! {
|
||||
"srv/echo".into() => sample_tool(),
|
||||
},
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
let tools = create_tools_json_for_chat_completions_api(&prompt, "gpt-4").unwrap();
|
||||
|
||||
Reference in New Issue
Block a user