Commit Graph

8 Commits

Author SHA1 Message Date
a8fbe658bb Add consistent error handling to text_embeddings and count_tokens
- Check HTTP status before parsing response body, matching the
  pattern used by generate_content and predict_image
- Unwrap TextEmbeddingResponse enum, returning TextEmbeddingResponseOk
- Extract CountTokensResponseResult struct and add into_result(),
  returning the unwrapped result instead of the raw enum
- All endpoints now consistently return the success type directly
  and surface API errors as GeminiError or GenericApiError
2026-01-30 20:32:40 +00:00
eb38c65ac5 Remove dead code and fix typo
- Remove unused AUTH_SCOPE constant from client.rs
- Remove unused ErrorType, ErrorInfoMetadata, FieldViolation,
  and Link types from types/error.rs
- Fix "EventSourrce" typo in error.rs Display impl
2026-01-30 20:29:55 +00:00
4c156fbb33 Remove unnecessary unsafe impl Send/Sync for GeminiClient
Both reqwest::Client and String already implement Send and Sync,
so the manual unsafe impls were redundant.
2026-01-30 20:27:54 +00:00
92030a0dd9 Remove prompt_conversation and dialogue module
Drop prompt_conversation, collect_text_from_response, Message,
and Dialogue to redesign the conversation feature later.
2026-01-30 20:26:31 +00:00
fa94677910 Clean unused imports 2026-01-29 20:24:56 +00:00
36f8965547 Clean up unused dependencies 2026-01-29 20:14:49 +00:00
ab8e4ede60 Drops the serde_eventsource dependency
serde_eventsource is taking a while to update to reqwest 13.*. This
PR implements handling SSE in the library code.
2026-01-29 20:04:33 +00:00
6786a5e9f0 Initial Commit 2025-11-26 17:51:15 +00:00