(baseConfig: {
model: string;
messages: any[];
temperature?: number;
max_tokens?: number;
web_search_options?: any;
[key: string]: any; // Allow for other parameters
})
| 11 | * @returns A model-specific configuration with appropriate parameters |
| 12 | */ |
| 13 | export function getModelConfig(baseConfig: { |
| 14 | model: string; |
| 15 | messages: any[]; |
| 16 | temperature?: number; |
| 17 | max_tokens?: number; |
| 18 | web_search_options?: any; |
| 19 | [key: string]: any; // Allow for other parameters |
| 20 | }) { |
| 21 | const config = { ...baseConfig }; |
| 22 | |
| 23 | // Models that don't support temperature |
| 24 | const noTempModels = ['o3-mini', 'gpt-4o-search-preview']; |
| 25 | |
| 26 | if (noTempModels.includes(config.model)) { |
| 27 | delete config.temperature; |
| 28 | } |
| 29 | |
| 30 | return config; |
| 31 | } |
nothing calls this directly
no outgoing calls
no test coverage detected