mirror of
https://github.com/zed-industries/zed.git
synced 2024-10-07 11:28:37 +03:00
Respect requested gemini model (#13427)
Previously, we always went to gemini-pro. Release Notes: - N/A
This commit is contained in:
parent
9298d3b525
commit
5b754915e4
@ -4503,6 +4503,7 @@ async fn complete_with_google_ai(
|
||||
session.http_client.clone(),
|
||||
google_ai::API_URL,
|
||||
api_key.as_ref(),
|
||||
&request.model.clone(),
|
||||
crate::ai::language_model_request_to_google_ai(request)?,
|
||||
)
|
||||
.await
|
||||
|
@ -11,10 +11,11 @@ pub async fn stream_generate_content(
|
||||
client: Arc<dyn HttpClient>,
|
||||
api_url: &str,
|
||||
api_key: &str,
|
||||
model: &str,
|
||||
request: GenerateContentRequest,
|
||||
) -> Result<BoxStream<'static, Result<GenerateContentResponse>>> {
|
||||
let uri = format!(
|
||||
"{}/v1beta/models/gemini-pro:streamGenerateContent?alt=sse&key={}",
|
||||
"{}/v1beta/models/{model}:streamGenerateContent?alt=sse&key={}",
|
||||
api_url, api_key
|
||||
);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user