summaryrefslogtreecommitdiffstats
path: root/src/client/vertexai_claude.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/vertexai_claude.rs')
-rw-r--r--src/client/vertexai_claude.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/client/vertexai_claude.rs b/src/client/vertexai_claude.rs
index 2b5f763..2c51d59 100644
--- a/src/client/vertexai_claude.rs
+++ b/src/client/vertexai_claude.rs
@@ -2,7 +2,7 @@ use super::access_token::*;
use super::claude::{claude_build_body, claude_send_message, claude_send_message_streaming};
use super::vertexai::prepare_gcloud_access_token;
use super::{
- Client, CompletionDetails, ExtraConfig, Model, ModelConfig, PromptAction, PromptKind, SendData,
+ Client, CompletionOutput, ExtraConfig, Model, ModelData, PromptAction, PromptKind, SendData,
SseHandler, VertexAIClaudeClient,
};
@@ -18,7 +18,7 @@ pub struct VertexAIClaudeConfig {
pub location: Option<String>,
pub adc_file: Option<String>,
#[serde(default)]
- pub models: Vec<ModelConfig>,
+ pub models: Vec<ModelData>,
pub extra: Option<ExtraConfig>,
}
@@ -39,7 +39,7 @@ impl VertexAIClaudeClient {
let base_url = format!("https://{location}-aiplatform.googleapis.com/v1/projects/{project_id}/locations/{location}/publishers");
let url = format!(
"{base_url}/anthropic/models/{}:streamRawPredict",
- self.model.name
+ self.model.name()
);
let mut body = claude_build_body(data, &self.model)?;
@@ -64,7 +64,7 @@ impl Client for VertexAIClaudeClient {
&self,
client: &ReqwestClient,
data: SendData,
- ) -> Result<(String, CompletionDetails)> {
+ ) -> Result<CompletionOutput> {
prepare_gcloud_access_token(client, self.name(), &self.config.adc_file).await?;
let builder = self.request_builder(client, data)?;
claude_send_message(builder).await