Make async (#5126)

Co-authored-by: Douwe Osinga <douwe@squareup.com>
This commit is contained in:
Douwe Osinga
2025-10-10 19:31:50 -04:00
committed by GitHub
parent 69a7b7fe5a
commit 1015064367
43 changed files with 343 additions and 480 deletions
+5 -6
View File
@@ -1,21 +1,20 @@
use std::sync::Arc;
use dotenvy::dotenv;
use futures::StreamExt;
use goose::agents::{Agent, AgentEvent, ExtensionConfig};
use goose::config::{DEFAULT_EXTENSION_DESCRIPTION, DEFAULT_EXTENSION_TIMEOUT};
use goose::conversation::message::Message;
use goose::conversation::Conversation;
use goose::providers::databricks::DatabricksProvider;
use goose::providers::create_with_named_model;
use goose::providers::databricks::DATABRICKS_DEFAULT_MODEL;
#[tokio::main]
async fn main() {
// Setup a model provider from env vars
let _ = dotenv();
let provider = Arc::new(DatabricksProvider::default());
let provider = create_with_named_model("databricks", DATABRICKS_DEFAULT_MODEL)
.await
.expect("Couldn't create provider");
// Setup an agent with the developer extension
let agent = Agent::new();
let _ = agent.update_provider(provider).await;