Commit Graph

15 Commits

Author SHA1 Message Date
63f0edf574 docs: update README and examples for v1.0.0
- Rewrite README with all new endpoints and current model names
- Add available models table with constructors
- Add FIM and OCR examples
- Update all examples for string-based Model type
- Update streaming example for Option<String> delta content
- Use serde_json::json!() for tool schemas in examples
- Add .envrc to .gitignore
2026-03-20 18:00:51 +00:00
Ivan Gabriele
cf68a77320 feat(chat)!: change safe_prompt, temperature & top_p to non-Option types
BREAKING CHANGE:
- `Chat::ChatParams.safe_prompt` & `Chat::ChatRequest.safe_prompt` are now `bool` instead of `Option<bool>`. Default is `false`.
- `Chat::ChatParams.temperature` & `Chat::ChatRequest.temperature` are now `f32` instead of `Option<f32>`. Default is `0.7`.
- `Chat::ChatParams.top_p` & `Chat::ChatRequest.top_p` are now `f32` instead of `Option<f32>`. Default is `1.0`.
2024-06-07 16:00:10 +02:00
Ivan Gabriele
ab91154d35 docs(readme): update examples 2024-03-09 11:41:39 +01:00
Ivan Gabriele
74bf8a96ee feat!: add function calling support to client.chat() & client.chat_async()
BREAKING CHANGE: Too many to count in this version. Check the README examples.
2024-03-09 11:40:07 +01:00
Ivan Gabriele
4a4219d3ea feat!: add client.chat_stream() method
BREAKING CHANGE: You can't set the `stream` option for `client.chat*()`.

Either use `client.chat_stream()` if you want to use streams
or use `client.chat()` / `client.chat_async()` otherwise.
2024-03-04 08:16:10 +01:00
Ivan Gabriele
3c228914f7 feat: add client.embeddings_async() method 2024-03-04 06:39:21 +01:00
Ivan Gabriele
b69f7c617c feat: add client.list_models_async() method 2024-03-04 06:33:38 +01:00
Ivan Gabriele
1dd59f6704 feat: add client.chat_async() method 2024-03-04 04:57:48 +01:00
Ivan Gabriele
33876183e4 feat!: wrap Client::new() return in a Result
BREAKING CHANGE: `Client::new()` now returns a `Result`.
2024-03-04 04:43:22 +01:00
Ivan Gabriele
bbba6b9878 docs(readme): fix list models example 2024-03-04 03:27:20 +01:00
Ivan Gabriele
f44d951247 feat!: add client.embeddings() method
BREAKING CHANGE: Models are now enforced by `Model` & `EmbedModel` enums.
2024-03-04 03:16:59 +01:00
Ivan Gabriele
814b9918b3 feat: add client.list_models() method 2024-03-03 19:42:00 +01:00
Ivan Gabriele
7de2b19b98 feat!: simplify chat completion call
BREAKING CHANGE: Chat completions must now be called directly from client.chat() without building a request in between.
2024-03-03 19:14:01 +01:00
Ivan Gabriele
4c65873adb docs(readme): update badges 2024-03-03 15:35:57 +01:00
Ivan Gabriele
7d3b438d16 feat: add chat completion without streaming 2024-03-03 15:20:30 +01:00