Merge branch 'custom_llm_base'

fix: updated readme and corrected server and worker to updates

added migration

fix: openai url typo & displaying models

chore: tidying up
This commit is contained in:
Per Stark
2025-06-06 23:17:04 +02:00
28 changed files with 622 additions and 96 deletions

View File

@@ -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

View File

@@ -36,7 +36,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 =

View File

@@ -26,7 +26,11 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
.await?,
);
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(db.clone(), openai_client.clone(), config).await?);