fix: inconsistent API url requirement between desktop and CLI versions (#6419)
Signed-off-by: Abhijay007 <Abhijay007j@gmail.com>
This commit is contained in:
@@ -154,7 +154,7 @@ impl OpenAiProvider {
|
||||
format!("{}://{}", url.scheme(), url.host_str().unwrap_or(""))
|
||||
};
|
||||
let base_path = url.path().trim_start_matches('/').to_string();
|
||||
let base_path = if base_path.is_empty() {
|
||||
let base_path = if base_path.is_empty() || base_path == "v1" || base_path == "v1/" {
|
||||
"v1/chat/completions".to_string()
|
||||
} else {
|
||||
base_path
|
||||
|
||||
Reference in New Issue
Block a user