The other prerequisite seems to be not using a `prompt` (`prompt: null`), but we already supported this. It'd be nice to add an optional `max_completion_tokens` parameter as well, for the benefit of the o1 models, but this is not yet supported by async-openai. Possibly tracked here: https://github.com/64bit/async-openai/issues/272
22 lines
543 B
Rust
22 lines
543 B
Rust
use super::openai_compat::Config;
|
|
|
|
pub fn default_config() -> Config {
|
|
let mut config = Config {
|
|
base_url: "https://openrouter.ai/api/v1".to_owned(),
|
|
|
|
text_to_speech: None,
|
|
image_generation: None,
|
|
speech_to_text: None,
|
|
|
|
..Default::default()
|
|
};
|
|
|
|
if let Some(ref mut config) = config.text_generation.as_mut() {
|
|
config.model_id = "mattshumer/reflection-70b:free".to_owned();
|
|
config.max_context_tokens = 8192;
|
|
config.max_response_tokens = Some(2048);
|
|
}
|
|
|
|
config
|
|
}
|