Everything is streaming (#7247)

Co-authored-by: Douwe Osinga <douwe@squareup.com>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Douwe Osinga
2026-02-17 19:53:38 +01:00
committed by GitHub
parent 65d3a1550f
commit 9a91fccfb5
42 changed files with 801 additions and 1718 deletions
+4 -7
View File
@@ -8,21 +8,18 @@ use goose::providers::databricks::DATABRICKS_DEFAULT_MODEL;
async fn main() -> Result<()> {
dotenv().ok();
// Clear any token to force OAuth
std::env::remove_var("DATABRICKS_TOKEN");
// Create the provider
let provider =
create_with_named_model("databricks", DATABRICKS_DEFAULT_MODEL, Vec::new()).await?;
// Create a simple message
let message = Message::user().with_text("Tell me a short joke about programming.");
// Get a response
let model_config = provider.get_model_config();
let (response, usage) = provider
.complete_with_model(
None,
&provider.get_model_config(),
.complete(
&model_config,
"",
"You are a helpful assistant.",
&[message],
&[],
+4 -3
View File
@@ -62,10 +62,11 @@ async fn main() -> Result<()> {
},
}
});
let model_config = provider.get_model_config();
let (response, usage) = provider
.complete_with_model(
None,
&provider.get_model_config(),
.complete(
&model_config,
"",
"You are a helpful assistant. Please describe any text you see in the image.",
&messages,
&[Tool::new("view_image", "View an image", input_schema)],