Changelog#

v3.0.0 (2024-05-27)#

🌟 Highlights#

  • Add llama 3 model πŸ¦™πŸ¦™πŸ¦™

  • Add fine tuning with deployments

  • Add lm-evaluation-harness extension

See πŸ“š Examples for more information.

πŸš€ Features / Enhancements#

πŸ› Bug Fixes#

πŸ“– Docs#

  • docs: update migration guide [@jezekra1]

  • docs(example): typo in text moderation [@lmandel]

  • docs(moderation): update description [@Tomas2D]

βš™οΈ Other#

  • chore: remove deprecated code #(358) [@jezekra1]

  • ci: deploy documentation after new version gets published [@Tomas2D]

  • chore: update dependencies [@Tomas2D]

Full Changelog: v2.3.0…v3.0.0

Warning

We have removed deprecations introduced after v2 release. See the V3 Migration Guide for detailed information.

πŸ”— 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/beta/evaluations

2023-11-22

POST

/v2/beta/evaluations

2023-11-22

GET

/v2/beta/evaluations/experiments

2023-11-22

POST

/v2/beta/evaluations/experiments

2023-11-22

DELETE

/v2/beta/evaluations/experiments/{id}

2023-11-22

GET

/v2/beta/evaluations/experiments/{id}

2023-11-22

GET

/v2/beta/evaluations/limits

2023-11-22

POST

/v2/beta/evaluations/preview

2023-11-22

GET

/v2/beta/evaluations/templates

2023-11-22

GET

/v2/beta/evaluations/templates/{id}

2023-11-22

DELETE

/v2/beta/evaluations/{id}

2023-11-22

GET

/v2/beta/evaluations/{id}

2023-11-22

GET

/v2/beta/evaluations/{id}/instance_results

2023-11-22

POST

/v2/beta/text/classification

2023-11-22

POST

/v2/beta/text/rerank

2023-11-22

POST

/v2/beta/text/sentence-similarity

2023-11-22

POST

/v2/beta/time_series/forecasting

2023-11-22

GET

/v2/beta/time_series/limits

2023-11-22

GET

/v2/deployments

2023-11-22

POST

/v2/deployments

2023-11-22

DELETE

/v2/deployments/{id}

2023-11-22

GET

/v2/deployments/{id}

2023-11-22

GET

/v2/files

2024-05-13

POST

/v2/files

2024-05-13

DELETE

/v2/files/{id}

2023-11-22

GET

/v2/files/{id}

2024-05-13

PATCH

/v2/files/{id}

2023-11-22

GET

/v2/files/{id}/content

2023-11-22

GET

/v2/folders

2023-11-22

POST

/v2/folders

2023-11-22

DELETE

/v2/folders/{id}

2023-11-22

GET

/v2/folders/{id}

2023-11-22

PATCH

/v2/folders/{id}

2024-01-10

PUT

/v2/folders/{id}

2023-11-22

GET

/v2/models

2023-11-22

GET

/v2/models/{id}

2024-01-30

GET

/v2/prompts

2024-03-19

POST

/v2/prompts

2024-03-19

DELETE

/v2/prompts/{id}

2023-11-22

GET

/v2/prompts/{id}

2024-03-19

PATCH

/v2/prompts/{id}

2024-03-19

PUT

/v2/prompts/{id}

2024-03-19

GET

/v2/requests

2023-11-22

DELETE

/v2/requests/chat/{conversation_id}

2023-11-22

GET

/v2/requests/chat/{conversation_id}

2024-03-19

DELETE

/v2/requests/{id}

2023-11-22

GET

/v2/requests/{id}/feedback

2023-11-22

POST

/v2/requests/{id}/feedback

2023-11-22

PUT

/v2/requests/{id}/feedback

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/tags

2023-11-22

GET

/v2/tasks

2023-11-22

POST

/v2/text/chat

2024-03-19

POST

/v2/text/chat/output

2024-03-19

POST

/v2/text/chat_stream

2024-03-19

POST

/v2/text/embeddings

2024-04-15

GET

/v2/text/embeddings/limits

2023-11-22

GET

/v2/text/extraction/limits

2023-11-22

POST

/v2/text/generation

2024-03-19

POST

/v2/text/generation/comparison

2024-03-19

GET

/v2/text/generation/limits

2023-11-22

POST

/v2/text/generation/output

2024-03-19

GET

/v2/text/generation/{id}/feedback

2023-11-22

POST

/v2/text/generation/{id}/feedback

2024-02-20

PUT

/v2/text/generation/{id}/feedback

2024-02-20

POST

/v2/text/generation_stream

2024-03-19

POST

/v2/text/moderations

2024-03-19

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

POST

/v2/tunes/preflight

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

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.3.0 (2024-03-22)#

  • Add Text Experimental module (see client.text.experimental)
    • Sentence Similarity (client.text.sentence_similarity).

    • Rerank (client.text.experimental.rerank).

    • Classification (client.text.experimental.classification).

  • Add Folder module (client.folder).

  • Add Tags module (client.tag).

  • Add Tasks module (client.task).

  • Add Request Feedback Service (client.request.feedback).

  • Update Moderations.
    • Add Social Bias model.

    • Remove Implicit Hate and Stigma model.

  • Add tune creation from an existing file (client.tune.create_from_file).

  • Allow to upload arbitrary files (remove old constraints for json files only).

  • Add support to update the file content (see client.file.update method).

  • Add support for the latest LangChain / LLamaIndex (migrate to 0.10.x) / Transformers versions.

  • Unify schemas between various services.

Deprecation Warnings

  • Stigma (ModerationStigma class) has been deprecated, use Social Bias instead (ModerationSocialBias class).

  • Implicit Hate (ModerationImplicitHate class) has been deprecated, use Social Bias instead (ModerationSocialBias class).

from genai.schema import ModerationHAP, ModerationHAPInput

 # ❌ Old Way
ModerationHAP(input=True, output=True, threshold=0.8)

 # βœ… New Way
ModerationHAP(
    input=ModerationHAPInput(enabled=True, threshold=0.8),
    output=ModerationHAPOutput(enabled=True, threshold=0.8)
)
  • Deprecate TuningType enum; use values from client.tune.types() method.

  • Following schemas or their properties were renamed.
    • UserPromptResult -> PromptResult

    • PromptsResponseResult -> PromptResult

    • UserResponseResult -> UserResult

    • UserCreateResultApiKey -> UserApiKey

    • PromptRetrieveRequestParamsSource -> PromptListSource

    • TextChatStreamCreateResponse.moderation -> TextChatStreamCreateResponse.moderations

    • TextGenerationStreamCreateResponse.moderation -> TextGenerationStreamCreateResponse.moderations

    • TextGenerationResult.moderation -> TextGenerationResult.moderations

    • BaseMessage.file_ids -> BaseMessage.files

πŸš€ Features / Enhancements#

  • feat(text): update schemas [@Tomas2D]

  • feat(request): update schemas [@Tomas2D]

  • feat(user): update schemas [@Tomas2D]

  • feat(model): update schemas [@Tomas2D]

  • feat(prompt): update schemas [@Tomas2D]

  • feat(task): init task module [@Tomas2D]

  • feat(text): init text experimental module (sentence similarity, rerank, classification) [@Tomas2D]

  • feat(tags): init tags module [@Tomas2D]

  • feat(folder): init folder module [@Tomas2D]

  • feat(llama-index): migrate to v0.10.x #(331) [@Tomas2D]

  • feat: add request feedback module and deprecate text generation feedback [@Tomas2D]

  • feat: improve schema generation [@Tomas2D]

  • feat: infer openapi schema type [@Tomas2D]

  • feat: add fallback for deprecated/removed schemas [@Tomas2D]

  • feat: add support for custom auth #(335) [@jezekra1]

  • feat(text): add input property to text generation to align with API [@Tomas2D]

  • feat(tune): replace static tuning type enum by dynamic retrieval [@Tomas2D]

  • feat(extension): add comments to the local server example [@Tomas2D]

  • feat(prompt): update folder_id parameter [@Tomas2D]

  • feat(user): update schemas (email property added) [@Tomas2D]

  • feat(file): add update method, add β€˜origin_id’ parameter and schema [@Tomas2D]

  • feat(request): update request chat conversation response body [@Tomas2D]

πŸ› Bug Fixes#

  • fix(tune): unexpected access to non-enum property [@Tomas2D]

πŸ“– Docs#

βš™οΈ Other#

  • test(langchain): use β€˜invoke’ method instead β€˜__call__’ [@Tomas2D]

  • test: add tests for schema deprecation [@Tomas2D]

  • test: add tests for endpoint aliases [@Tomas2D]

  • test: remove non existing models [@Tomas2D]

Full Changelog: v2.2.0…v2.3.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

POST

/v2/beta/text/classification

2023-11-22

POST

/v2/beta/text/rerank

2023-11-22

POST

/v2/beta/text/sentence-similarity

2023-11-22

POST

/v2/beta/time_series/forecasting

2023-11-22

GET

/v2/beta/time_series/limits

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

PATCH

/v2/files/{id}

2023-11-22

GET

/v2/files/{id}/content

2023-11-22

GET

/v2/folders

2023-11-22

POST

/v2/folders

2023-11-22

DELETE

/v2/folders/{id}

2023-11-22

GET

/v2/folders/{id}

2023-11-22

PATCH

/v2/folders/{id}

2024-01-10

PUT

/v2/folders/{id}

2023-11-22

GET

/v2/models

2023-11-22

GET

/v2/models/{id}

2024-01-30

GET

/v2/prompts

2024-03-19

POST

/v2/prompts

2024-03-19

DELETE

/v2/prompts/{id}

2023-11-22

GET

/v2/prompts/{id}

2024-03-19

PATCH

/v2/prompts/{id}

2024-03-19

PUT

/v2/prompts/{id}

2024-03-19

GET

/v2/requests

2023-11-22

DELETE

/v2/requests/chat/{conversation_id}

2023-11-22

GET

/v2/requests/chat/{conversation_id}

2024-03-19

DELETE

/v2/requests/{id}

2023-11-22

GET

/v2/requests/{id}/feedback

2023-11-22

POST

/v2/requests/{id}/feedback

2023-11-22

PUT

/v2/requests/{id}/feedback

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/tags

2023-11-22

GET

/v2/tasks

2023-11-22

POST

/v2/text/chat

2024-03-19

POST

/v2/text/chat/output

2024-03-19

POST

/v2/text/chat_stream

2024-03-19

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-03-19

POST

/v2/text/generation/comparison

2024-03-19

GET

/v2/text/generation/limits

2023-11-22

POST

/v2/text/generation/output

2024-03-19

GET

/v2/text/generation/{id}/feedback

2023-11-22

POST

/v2/text/generation/{id}/feedback

2024-02-20

PUT

/v2/text/generation/{id}/feedback

2024-02-20

POST

/v2/text/generation_stream

2024-03-19

POST

/v2/text/moderations

2024-03-19

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.2.0 (2024-02-20)#

πŸš€ Features / Enhancements#

πŸ› Bug Fixes#

πŸ“– Docs#

βš™οΈ Other#

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#

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#

πŸ› Bug Fixes#

πŸ“– Docs#

βš™οΈ Other#

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)#

Full Changelog: v0.6.0…v0.6.1

v0.6.0 (2023-12-08)#

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 to generate_stream / generate_as_complete and generate 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 of tqdm.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 and generate_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 the GenerateParams (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 the LangChainInterface, which can now be controlled via the include_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 environment

  • Hide 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 of ConnectionManager.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 the Can'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)#

New Contributors#

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