mirror of
https://github.com/perstarkse/minne.git
synced 2026-03-30 14:22:00 +02:00
feat: support for other providers of ai models
This commit is contained in:
@@ -38,7 +38,9 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
|
||||
let session_store = Arc::new(db.create_session_store().await?);
|
||||
let openai_client = Arc::new(async_openai::Client::with_config(
|
||||
async_openai::config::OpenAIConfig::new().with_api_key(&config.openai_api_key),
|
||||
async_openai::config::OpenAIConfig::new()
|
||||
.with_api_key(&config.openai_api_key)
|
||||
.with_api_base(&config.openai_base_url),
|
||||
));
|
||||
|
||||
let html_state =
|
||||
@@ -94,7 +96,11 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
);
|
||||
|
||||
// Initialize worker components
|
||||
let openai_client = Arc::new(async_openai::Client::new());
|
||||
let openai_client = Arc::new(async_openai::Client::with_config(
|
||||
async_openai::config::OpenAIConfig::new()
|
||||
.with_api_key(&config.openai_api_key)
|
||||
.with_api_base(&config.openai_base_url),
|
||||
));
|
||||
let ingestion_pipeline = Arc::new(
|
||||
IngestionPipeline::new(worker_db.clone(), openai_client.clone(), config.clone())
|
||||
.await
|
||||
|
||||
Reference in New Issue
Block a user