9a8732f609
Move PersonGeneration parameter to enum
2025-06-08 09:11:01 +01:00
6e64b8fd72
Add missing parameters to imagegen
2025-06-08 08:58:48 +01:00
d1678bdc37
Define specific error for event stream ended
2025-04-06 08:12:58 +01:00
8ff379d040
Fixes lifetime for TokenProvider
2025-04-05 19:51:07 +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
de9b14b984
Add support for the Google Search tool
...
- Gemini 2.0 and above use a google_search tool instead of a
google_search_retrieval tool. This commit adds support for the new tool.
2025-03-26 20:47:48 +00:00
83663680c9
Increase embedding precision to f64
2024-12-31 08:39:46 +00:00
fd1223da59
More builder refactoring
2024-11-27 16:20:53 +00:00
56d6b95c53
Add shortcuts for commonly used functions
2024-11-27 15:57:18 +00:00
db5a01afef
Adds more builders
2024-11-27 15:11:01 +00:00
326b3919d1
Add builders for GenerateContent and CountToken
2024-11-26 20:27:36 +00:00
e6de1d1ce7
Adds error logging when failing o parse response
2024-10-06 08:18:05 +01:00
eb36c49493
Merge branch 'main' of https://github.com/andreban/gemini-rs
2024-10-05 17:07:24 +01:00
bbe5433d83
Adds code for image generation
2024-10-05 17:07:18 +01:00
dc1b5cabdf
Adds support for the response schema field
...
- Support is added by allowing a serde_json `Value`.
- In the future, this could be improved by using a proper `Schema`
definition.
2024-09-20 15:47:21 +01:00
cb954ea5db
Adds safety setting
2024-08-15 14:45:27 +01:00
60c20958a4
Update README.md
2024-07-30 21:06:52 +01:00
d0d2dd6bab
Make safety rating scores optional
...
- The API doesn't always return `probabilityScore` and
`severityScore` for a safety rating, causing the parsing to fail
- This commit makes those fields optional to fix that.
2024-07-30 15:04:16 +01:00
74150d16b0
Makes all usageMetadata fields optional
2024-07-12 16:49:58 +01:00
154b2f353b
Create rust.yml
2024-07-04 20:09:15 +01:00
81c7dccbdf
Add support for the GoogleSearchRetrieval tool
2024-06-14 13:35:21 +01:00
3a97f75a5c
Fix generate_content result parsing
...
`generate_content()` was parsing the reqwest result to
`GenerateContentResponseResult` instead of
`GenerateContentResponse`, causing error responses to be handled
incorrectly.
This is fixed by ensuring the result string is parsed
into the correct type.
2024-06-13 15:50:57 +01:00
c4e9f78ec9
Make content role optional
2024-06-09 10:07:00 +01:00
8e2c7dc41b
Add lifetime to TokenProvider
2024-06-04 20:39:49 +01:00
14010f9f78
Update GCP Auth to 0.12
2024-06-04 07:25:01 +01:00
1bd5ab830a
Merge branch 'main' of https://github.com/andreban/gemini-rs
2024-05-28 08:33:22 +01:00
9f7bf33057
Avoid pinning dependency versions
...
Pinning specific versions in the library makes it harder for
applications to use newer versions o those dependencies. This is fixed
by setting setting only the major version for libraries that have
reached version 1.0.0 and above and major and minor versions for
dependencies that have not reached version 1.0.0 as those can have their
API surface changed across minor versions.
2024-05-28 08:30:49 +01:00
e056edc2c4
Implements result conversation for embedding results
2024-05-14 22:33:12 +01:00
e45755ffea
Small refactor to close stream as soon as response is finished
2024-05-02 18:36:37 +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
9754618153
Make SafetyRatings option in Candidates
2024-04-25 14:46:03 +01:00
5fde27b70d
Allow using system instructions
2024-04-19 18:23:17 +01:00
3d298fabbc
Allow user to choose a conversation model
2024-04-18 15:36:26 +01:00
8b94651a84
Makes candidate content optional
2024-04-17 13:32:54 +01:00
64a3f0e2c1
Add response mime type to GenerationConfig
2024-04-17 12:00:49 +01:00
0e219aded0
Make text embedding title optional
...
- Make text embedding title optional, as sending it causes erros
on tasks that don't support title, like CLASSIFICATION.
- Update dependencies
2024-04-15 11:11:18 +01:00
5de4a96d33
Makes start_index and end_index optional in Citations
2024-03-01 14:06:12 +00:00
1c0aaf57b3
Allows different models for text-embedding
2024-03-01 13:45:26 +00:00
d7f041fa95
Better error logging
2024-03-01 13:40:02 +00:00
8e9a186ba9
Adds a count_token methods to the Gemini Clent
2024-02-29 19:48:42 +00:00
f2da435af8
Makes Error details optional
...
- Makes Error details option, as many types don't return the field.
- Removes dangling println statement.
2024-02-29 12:36:20 +00:00
c538d915e5
Make fields from TextEmbeddingResult and TextEmbeddingStatistics public
2024-02-28 14:49:34 +00:00
627ce368b4
Add the text_embeddings API
2024-02-28 14:03:30 +00:00
b8f2b7e85e
Refactor types into separate files
2024-02-23 18:25:32 +00:00
93285e53dd
Updates client to use the generateContent endpoint when not streaming
2024-02-23 14:42:51 +00:00
83335e65dc
Adds streaming content
2024-02-16 21:36:08 +00:00
cc78aea3ff
Make Dialogue serializable
2024-02-07 20:20:51 +00:00
5ab9f353bc
Rename client and refactors dialog
2024-02-07 20:19:11 +00:00
4f49ec8478
Make Citation uri Optional
2024-02-07 14:01:23 +00:00