Changelog#
v2.2.0 (2024-02-20)#
π Features / Enhancements#
feat(llama-index): add embeddings #(316) [@David-Kristek]
π Bug Fixes#
π Docs#
βοΈ Other#
typo: fix bam api url in documentation #(319) [Aditya Gupta]
docs(langchain): add langchain sql agent example #(314) [@Tomas2D]
chore: less strict typings #(315) [@David-Kristek]
Full Changelog: v2.1.1β¦v2.2.0
π API Endpoint Versions#
API Endpoint Versions
Method |
Path |
Version (YYYY-MM-DD) |
---|---|---|
GET |
/v2/api_key |
2023-11-22 |
POST |
/v2/api_key/regenerate |
2023-11-22 |
GET |
/v2/files |
2023-12-15 |
POST |
/v2/files |
2023-12-15 |
DELETE |
/v2/files/{id} |
2023-11-22 |
GET |
/v2/files/{id} |
2023-12-15 |
GET |
/v2/files/{id}/content |
2023-11-22 |
GET |
/v2/models |
2023-11-22 |
GET |
/v2/models/{id} |
2024-01-30 |
GET |
/v2/prompts |
2024-01-10 |
POST |
/v2/prompts |
2024-01-10 |
DELETE |
/v2/prompts/{id} |
2023-11-22 |
GET |
/v2/prompts/{id} |
2024-01-10 |
PATCH |
/v2/prompts/{id} |
2024-01-10 |
PUT |
/v2/prompts/{id} |
2024-01-10 |
GET |
/v2/requests |
2023-11-22 |
DELETE |
/v2/requests/chat/{conversationId} |
2023-11-22 |
GET |
/v2/requests/chat/{conversationId} |
2023-11-22 |
DELETE |
/v2/requests/{id} |
2023-11-22 |
GET |
/v2/system_prompts |
2023-11-22 |
POST |
/v2/system_prompts |
2023-11-22 |
DELETE |
/v2/system_prompts/{id} |
2023-11-22 |
GET |
/v2/system_prompts/{id} |
2023-11-22 |
PUT |
/v2/system_prompts/{id} |
2023-11-22 |
GET |
/v2/tasks |
2023-11-22 |
POST |
/v2/text/chat |
2024-01-10 |
POST |
/v2/text/chat/output |
2024-01-10 |
POST |
/v2/text/chat_stream |
2024-01-10 |
POST |
/v2/text/embeddings |
2023-11-22 |
GET |
/v2/text/embeddings/limits |
2023-11-22 |
GET |
/v2/text/extraction/limits |
2023-11-22 |
POST |
/v2/text/generation |
2024-01-10 |
POST |
/v2/text/generation/comparison |
2023-11-22 |
GET |
/v2/text/generation/limits |
2023-11-22 |
POST |
/v2/text/generation/output |
2023-11-22 |
GET |
/v2/text/generation/{id}/feedback |
2023-11-22 |
POST |
/v2/text/generation/{id}/feedback |
2023-11-22 |
PUT |
/v2/text/generation/{id}/feedback |
2023-11-22 |
POST |
/v2/text/generation_stream |
2024-01-10 |
POST |
/v2/text/moderations |
2023-11-22 |
POST |
/v2/text/tokenization |
2024-01-10 |
GET |
/v2/tunes |
2023-11-22 |
POST |
/v2/tunes |
2023-11-22 |
POST |
/v2/tunes/import |
2023-11-22 |
DELETE |
/v2/tunes/{id} |
2023-11-22 |
GET |
/v2/tunes/{id} |
2023-11-22 |
PATCH |
/v2/tunes/{id} |
2023-11-22 |
GET |
/v2/tunes/{id}/content/{type} |
2023-12-15 |
GET |
/v2/tuning_types |
2024-01-30 |
DELETE |
/v2/user |
2023-11-22 |
GET |
/v2/user |
2023-11-22 |
PATCH |
/v2/user |
2023-11-22 |
POST |
/v2/user |
2023-11-22 |
v2.1.1 (2024-02-02)#
π Bug Fixes#
βοΈ Other#
fix(docs): update pre-build hook [@Tomas2D]
Full Changelog: v2.1.0β¦v2.1.1
v2.1.0 (2024-01-30)#
Schema Import (deprecation warning)
Schemas are now exported from genai.schema (the old way of importing remains to work, but you will receive a warning)
π Features / Enhancements#
feat: refactor schemas for better user experience #(294) [@jezekra1]
feat: add truncate_input_tokens parameter for embeddings #(280) [@jezekra1]
feat: migrate to langchain_core #(261) [@David-Kristek]
feat: adjust tests and pipeline to ensure 3.12 compatibility #(259) [@jezekra1]
feat(example): add chromadb embedding function #(270) [@Tomas2D]
feat(langchain): correctly handles prompt_id and model_id #(293) [@Tomas2D]
feat(examples): add example of langchain agent with tools #(268) [@David-Kristek]
feat(langchain): update core and related dependencies #(282) [@Tomas2D]
π Bug Fixes#
π Docs#
docs: update links in README [@Tomas2D]
docs: update link to the migration guide [@Tomas2D]
docs: add installation note for extensions #(291) [@Tomas2D]
docs: update migration guide, examples, deploy #(271) [@Tomas2D]
docs: update README [@Tomas2D]
docs: update faq / credentials / migration guide #(263) [@Tomas2D]
βοΈ Other#
build: add langchain to dev dependencies [@Tomas2D]
refactor: remove list comprehensions to preserve type-hints #(301) [@jezekra1]
ci: update git checkout for documentation build [@Tomas2D]
ci: update docs build script [@Tomas2D]
build: remove unused dependencies and update versions #(264) [@Tomas2D]
Full Changelog: v2.0.0β¦v2.1.0
π API Endpoint Versions#
API Endpoint Versions
Method |
Path |
Version (YYYY-MM-DD) |
---|---|---|
GET |
/v2/api_key |
2023-11-22 |
POST |
/v2/api_key/regenerate |
2023-11-22 |
GET |
/v2/files |
2023-12-15 |
POST |
/v2/files |
2023-12-15 |
DELETE |
/v2/files/{id} |
2023-11-22 |
GET |
/v2/files/{id} |
2023-12-15 |
GET |
/v2/files/{id}/content |
2023-11-22 |
GET |
/v2/models |
2023-11-22 |
GET |
/v2/models/{id} |
2024-01-30 |
GET |
/v2/prompts |
2024-01-10 |
POST |
/v2/prompts |
2024-01-10 |
DELETE |
/v2/prompts/{id} |
2023-11-22 |
GET |
/v2/prompts/{id} |
2024-01-10 |
PATCH |
/v2/prompts/{id} |
2024-01-10 |
PUT |
/v2/prompts/{id} |
2024-01-10 |
GET |
/v2/requests |
2023-11-22 |
DELETE |
/v2/requests/chat/{conversationId} |
2023-11-22 |
GET |
/v2/requests/chat/{conversationId} |
2023-11-22 |
DELETE |
/v2/requests/{id} |
2023-11-22 |
GET |
/v2/system_prompts |
2023-11-22 |
POST |
/v2/system_prompts |
2023-11-22 |
DELETE |
/v2/system_prompts/{id} |
2023-11-22 |
GET |
/v2/system_prompts/{id} |
2023-11-22 |
PUT |
/v2/system_prompts/{id} |
2023-11-22 |
GET |
/v2/tasks |
2023-11-22 |
POST |
/v2/text/chat |
2024-01-10 |
POST |
/v2/text/chat/output |
2024-01-10 |
POST |
/v2/text/chat_stream |
2024-01-10 |
POST |
/v2/text/embeddings |
2023-11-22 |
GET |
/v2/text/embeddings/limits |
2023-11-22 |
GET |
/v2/text/extraction/limits |
2023-11-22 |
POST |
/v2/text/generation |
2024-01-10 |
POST |
/v2/text/generation/comparison |
2023-11-22 |
GET |
/v2/text/generation/limits |
2023-11-22 |
POST |
/v2/text/generation/output |
2023-11-22 |
GET |
/v2/text/generation/{id}/feedback |
2023-11-22 |
POST |
/v2/text/generation/{id}/feedback |
2023-11-22 |
PUT |
/v2/text/generation/{id}/feedback |
2023-11-22 |
POST |
/v2/text/generation_stream |
2024-01-10 |
POST |
/v2/text/moderations |
2023-11-22 |
POST |
/v2/text/tokenization |
2024-01-10 |
GET |
/v2/tunes |
2023-11-22 |
POST |
/v2/tunes |
2023-11-22 |
POST |
/v2/tunes/import |
2023-11-22 |
DELETE |
/v2/tunes/{id} |
2023-11-22 |
GET |
/v2/tunes/{id} |
2023-11-22 |
PATCH |
/v2/tunes/{id} |
2023-11-22 |
GET |
/v2/tunes/{id}/content/{type} |
2023-12-15 |
GET |
/v2/tuning_types |
2024-01-30 |
DELETE |
/v2/user |
2023-11-22 |
GET |
/v2/user |
2023-11-22 |
PATCH |
/v2/user |
2023-11-22 |
POST |
/v2/user |
2023-11-22 |
v2.0.0 (2024-01-15)#
On November 22nd, 2023, the API (v2) was announced. We reflected this change on the Python SDK by rewriting its core to be faster, more reliable and mainly in sync with the API. The new SDK brings the concept of the central client, which gives you access to the API very straightforward. This concept was recently integrated into OpenAI SDK / Cohere SDK, and more are joining.
To seamlessly migrate from V0.X versions to 2.0, we have prepared the Migration Guide. The reborn documentation with a lot of examples will help you get started.
Here is a little sneak peek.
Very Performant.
Generated Typings directly from the API.
Smart Requests Concurrency Handling.
Retry Mechanism in case of network or API failure.
Batching Large Requests automatically.
Easy to extend.
Full Changelog: v0.6.1β¦v2.0.0
π API Endpoint Versions#
API Endpoint Versions
Method |
Path |
Version (YYYY-MM-DD) |
---|---|---|
GET |
/v2/api_key |
2023-11-22 |
POST |
/v2/api_key/regenerate |
2023-11-22 |
GET |
/v2/files |
2023-12-15 |
POST |
/v2/files |
2023-12-15 |
DELETE |
/v2/files/{id} |
2023-11-22 |
GET |
/v2/files/{id} |
2023-12-15 |
GET |
/v2/files/{id}/content |
2023-11-22 |
GET |
/v2/models |
2023-11-22 |
GET |
/v2/models/{id} |
2024-01-10 |
GET |
/v2/prompts |
2024-01-10 |
POST |
/v2/prompts |
2024-01-10 |
DELETE |
/v2/prompts/{id} |
2023-11-22 |
GET |
/v2/prompts/{id} |
2024-01-10 |
PATCH |
/v2/prompts/{id} |
2024-01-10 |
PUT |
/v2/prompts/{id} |
2024-01-10 |
GET |
/v2/requests |
2023-11-22 |
DELETE |
/v2/requests/chat/{conversationId} |
2023-11-22 |
GET |
/v2/requests/chat/{conversationId} |
2023-11-22 |
DELETE |
/v2/requests/{id} |
2023-11-22 |
GET |
/v2/tasks |
2023-11-22 |
POST |
/v2/text/chat |
2024-01-10 |
POST |
/v2/text/chat/output |
2024-01-10 |
POST |
/v2/text/chat_stream |
2024-01-10 |
POST |
/v2/text/embeddings |
2023-11-22 |
GET |
/v2/text/embeddings/limits |
2023-11-22 |
GET |
/v2/text/extraction/limits |
2023-11-22 |
POST |
/v2/text/generation |
2024-01-10 |
POST |
/v2/text/generation/comparison |
2023-11-22 |
GET |
/v2/text/generation/limits |
2023-11-22 |
POST |
/v2/text/generation/output |
2023-11-22 |
GET |
/v2/text/generation/{id}/feedback |
2023-11-22 |
POST |
/v2/text/generation/{id}/feedback |
2023-11-22 |
PUT |
/v2/text/generation/{id}/feedback |
2023-11-22 |
POST |
/v2/text/generation_stream |
2024-01-10 |
POST |
/v2/text/moderations |
2023-11-22 |
POST |
/v2/text/tokenization |
2024-01-10 |
GET |
/v2/tunes |
2023-11-22 |
POST |
/v2/tunes |
2023-11-22 |
POST |
/v2/tunes/import |
2023-11-22 |
DELETE |
/v2/tunes/{id} |
2023-11-22 |
GET |
/v2/tunes/{id} |
2023-11-22 |
PATCH |
/v2/tunes/{id} |
2023-11-22 |
GET |
/v2/tunes/{id}/content/{type} |
2023-12-15 |
GET |
/v2/tuning_types |
2023-11-22 |
DELETE |
/v2/user |
2023-11-22 |
GET |
/v2/user |
2023-11-22 |
PATCH |
/v2/user |
2023-11-22 |
POST |
/v2/user |
2023-11-22 |
v0.6.1 (2023-12-20)#
fix: correct llama-index import for new version by @David-Kristek in #(243)
fix(examples): correct Hugging Face example prompt by @David-Kristek in #(244)
fix: prevent duplicating template with same name by @Tomas2D in #(245)
Full Changelog: v0.6.0β¦v0.6.1
v0.6.0 (2023-12-08)#
feat(extensions): add support for llamaindex by @David-Kristek in #(238)
fix: update aiohttp to support python 3.12 by @Tomas2D in #(239)
fix: add missing init.py in package to fix broken import by @jezekra1 in #(241)
fix: update maximal local concurrency limit based on API response by @Tomas2D in #(242)
New Contributors#
Full Changelog: v0.5.1β¦v0.5.2
v0.5.1 (2023-11-17)#
π Bug fixes#
Add missing rate-limit check for tokenize methods
Unify error messages between sync and async methods
Full Changelog: v0.5.0β¦v0.5.1
v0.5.0 (2023-11-13)#
π Features / Enhancements#
Added integration for LangChain Chat Models; see an example of generation and streaming.
Added support for LangChain Model Serialization (saving and loading models); see an example.
Added support for the Chat endpoint in
Model
class; see an example.Added support for new moderation models (HAP, STIGMA, Implicit Hate) - not released on API yet but will be available soon.
Added type validation for input_tokens property in generate response.
Extend LangChain generation information / LLM Output (token_usage structure, generated tokens, stop_reason, conversation_id, created_at, β¦).
Add optional
raw_response=True/False
parameter togenerate_stream
/generate_as_complete
andgenerate
methods to receive a raw response instead of unwrapped results.
π Bug fixes#
LangChain extension now correctly tokenizes the inputs (previously, the GPT2 tokenizer had been used).
Improve general error handling.
Full Changelog: v0.4.1β¦v0.5.0
v0.4.1 (2023-10-27)#
π Bug fixes#
Correctly handle file responses
Use
tqdm.auto
instead oftqdm.tqdm
to improve display in Jupyter Notebooks
Full Changelog: v0.4.0β¦v0.4.1
v0.4.0 (2023-10-24)#
β οΈ Switch to Pydantic V2#
In case your application is dependent on Pydantic V1, refer to the migration guide.
If you cannot upgrade, stick to the previous version 0.3.2.
Full Changelog: v0.3.2β¦v0.4.0
v0.3.2 (2023-10-23)#
π Bug fixes#
Correctly handle async errors and process abortion
π§ Configuration Changes#
Increase async generate/tokenize retry limits from 3 to 5
Full Changelog: v0.3.1β¦v0.3.2
v0.3.1 (2023-10-20)#
π Features / Enhancements#
Handle concurrency limits for
generate
andgenerate_as_completed
methods.Add automatic handling of rate limits for the tokenize endpoint (tokenize_async method).
Added
stop_sequence
parameter for generated output (non-empty token which caused the generation to stop) + added -include_stop_sequence
parameter for theGenerateParams
(it indicates whether the stop sequence (which caused the generation to stop) is part of the generated text. The default value depends on the model in use).Removed hidden
stop_sequences
removal inside theLangChainInterface
, which can now be controlled via theinclude_stop_sequence
parameter.Improve general error handling + method signatures (improve Python typings).
π Bug fixes#
Fix stacked progress bar (
generate_async
method)Handle cases when the package is used inside the
asyncio
environmentHide warning when an unknown field is retrieved in the generated response
Full Changelog: v0.3.0β¦v0.3.1
v0.3.0 (2023-10-12)#
π Features / Enhancements#
Added Hugging Face Agent support; see an example.
Drastically improve the speed of
generate_async
method - the concurrency limit is now automatically inferred from the API. (custom setting ofConnectionManager.MAX_CONCURRENT_GENERATE
will be ignored). In case you want to slow down the speed of generating, just pass the following parameter to the method:max_concurrency_limit=1
or any other value.Increase the default tokenize processing limits from 5 requests per second to 10 requests per second (this will be increased in the future).
π Bug fixes#
Throws on unhandled exceptions during the
generate_async
calls. Correctly cleanups the async HTTP clients when the task/calculation is being cancelled (for instance, you call generate_async in Jupyter - Notebook and then click the stop button). This should prevent receiving theCan't have two active async_generate_clients
error.Fix async support for newer LangChain versions (
>=0.0.300
)Fix LangChain PromptTemplate import warning in newer versions of LangChain
Correctly handle server errors when streaming
Fix
tune_methods
method
v0.2.8 (2023-09-25)#
π Features / Enhancements#
Added moderation support; now you can retrieve HAP for generated requests (example)
Internally improve streaming processing (poor or unstable internet connection)
Internally improve server response parsing and error handling
Add a user-agent header to distinguish Python SDK on the API
π Bug fixes#
LangChain - correct handling of stop_sequences
Correctly set versions of used dependencies (httpx / pyyaml)
Prevents unexpected modifications to userβs GenerateParams passed to the Model class
Prevents unexpected errors when GenerateParams contains stream=True and generate (non-stream) version is called
π§ Configuration changes#
Remove API version from the API endpoint string
Full Changelog: v0.2.7β¦v0.2.8
v0.2.7 (2023-09-15)#
Full Changelog: v0.2.6β¦v0.2.7
v0.2.6 (2023-09-11)#
feat(langchain): add streaming support by @Tomas2D in #(144)
feat(http): allow override httpx options by @Tomas2D in #(149)
chore: adding escapting of backslashes for re.sub value by @assaftibm in #(84)
update schema for stop_sequences generate param by @mirianfsilva in #(142)
New Contributors#
@assaftibm made their first contribution in #(84)
Full Changelog: v0.2.5β¦v0.2.6
v0.2.5 (2023-08-21)#
TOUs handling
Update Pydantic version
Update examples
Full Changelog: v0.2.4β¦v0.2.5
v0.2.4 (2023-08-01)#
Updated the documentation (imports of credentials) Updated schemas for config Added params in GeneratedParams Updated examples Updated tests
v0.2.3 (2023-07-24)#
Remove ModelType enum
Add utils for Model class: listing, info, available, etc.
Pydantic model allows extra params
Tests
v0.2.2 (2023-07-11)#
Documentation Updates.
v0.2.1 (2023-07-10)#
Documentation update Example update
v0.2.0 (2023-07-10)#
Model Tuning File manager Tuning Manager ModelType deprecation warning Open Source documentation update
v0.1.19 (2023-06-30)#
Fixed pydantic version issue
v0.1.18 (2023-06-30)#
Watsonx Templating support Documentation and examplesβ update Parameters updated for upstream compatibility with sampling method Retry mechanism update
v0.1.17 (2023-06-23)#
Modifications to examples/tests to avoid sampling-related parameters with greedy decoding
Updates to build process
Modifications to error messages
v0.1.16 (2023-06-21)#
Documentation update
Local server example
Open source contributions information
Example endpoints updated
v0.1.15 (2023-06-08)#
π¨ GitHub Workflows
β¨ Progress bar in async_generate function
π Updating Terms of Use to use PATCH
π¨ Adding accessors attribute to model class
β¨Search Space example and utils
β¨ Localserver Extension