Change the /chat route to /chat/completions to be OpenAI-compatible

This commit is contained in:
Clément Renault 2025-05-20 10:14:56 +02:00 committed by Kerollmops
parent a51579e923
commit 487002f2f0
No known key found for this signature in database
GPG Key ID: F250A4C4E3AE5F5F

View File

@ -42,7 +42,7 @@ use crate::search_queue::SearchQueue;
const EMBEDDER_NAME: &str = "openai";
pub fn configure(cfg: &mut web::ServiceConfig) {
cfg.service(web::resource("").route(web::post().to(chat)));
cfg.service(web::resource("/completions").route(web::post().to(chat)));
}
/// Get a chat completion