mirror of
https://github.com/aljazceru/goose.git
synced 2025-12-19 23:24:23 +01:00
feat: ollama tool shim (#1448)
Co-authored-by: Alice Hau <ahau@squareup.com>
This commit is contained in:
@@ -296,8 +296,16 @@ pub async fn configure_provider_dialog() -> Result<bool, Box<dyn Error>> {
|
||||
let spin = spinner();
|
||||
spin.start("Checking your configuration...");
|
||||
|
||||
// Use max tokens to speed up the provider test.
|
||||
let model_config = goose::model::ModelConfig::new(model.clone()).with_max_tokens(Some(50));
|
||||
// Create model config with env var settings
|
||||
let model_config = goose::model::ModelConfig::new(model.clone())
|
||||
.with_max_tokens(Some(50))
|
||||
.with_toolshim(
|
||||
std::env::var("GOOSE_TOOLSHIM")
|
||||
.map(|val| val == "1" || val.to_lowercase() == "true")
|
||||
.unwrap_or(false),
|
||||
)
|
||||
.with_toolshim_model(std::env::var("GOOSE_TOOLSHIM_OLLAMA_MODEL").ok());
|
||||
|
||||
let provider = create(provider_name, model_config)?;
|
||||
|
||||
let messages =
|
||||
|
||||
Reference in New Issue
Block a user