Updates client to use the generateContent endpoint when not streaming
This commit is contained in:
@@ -11,6 +11,7 @@ pub enum Error {
|
||||
Token(gcp_auth::Error),
|
||||
Serde(serde_json::Error),
|
||||
VertexError(types::Error),
|
||||
NoCandidatesError,
|
||||
}
|
||||
|
||||
impl Display for Error {
|
||||
@@ -23,6 +24,9 @@ impl Display for Error {
|
||||
Error::VertexError(e) => {
|
||||
write!(f, "Vertex error: {}", serde_json::to_string(e).unwrap())
|
||||
}
|
||||
Error::NoCandidatesError => {
|
||||
write!(f, "No candidates returned for the prompt")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user