Commit Graph

10 Commits

Author SHA1 Message Date
ba9870277c fix: return error on non-2xx response in stream_generate_content (#3)
Some checks failed
Rust / build (pull_request) Has been cancelled
Check response.status() before building the SSE event stream. On non-success
status, parse the response body as GenerateContentResponseError when
possible (returning Error::VertexError), and fall back to Error::HttpStatus
with the status code and raw text. Adds tests for HTTP 400 Vertex error,
non-JSON HTTP 500 error, and successful 200 SSE streaming.
2026-10-18 22:47:23 +01:00
494aab6d14 feat: add SSE streaming, thinking models, and modernized Part struct
Some checks failed
Rust / build (push) Has been cancelled
2026-09-20 16:42:55 +01:00
d1678bdc37 Define specific error for event stream ended 2025-04-06 08:12:58 +01:00
51d6a27017 Adds streaming generation that returns a streaming
- Introducues generate_content_stream that returns a Tokio Steam instead
of a Queue. This allows using the standard stream APIs from
tokio-streams.
- Replace future-utils with tokio-streams, mainly due to better
ergonomics for using the filter_map stream combinator.
2025-04-05 19:18:33 +01:00
ec98297a8a Run cargo clippy --fix 2024-05-01 17:16:04 +01:00
a640d97efb Makes generate content error result into Error 2024-05-01 17:14:32 +01:00
93285e53dd Updates client to use the generateContent endpoint when not streaming 2024-02-23 14:42:51 +00:00
8c42901ddf Deserialization and error handling improvements 2024-02-07 07:43:11 +00:00
450fe84d8b Improves error handling 2024-02-06 21:23:04 +00:00
67c6ba878b Add base code and examples for the Vertex API
- Add base code for the Vertex API with types and a client with helper
  methods for prompting text and conversation.
- Add examples for prompting text and conversation.
2024-02-06 20:50:36 +00:00