diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index c66ec0d..b7bc872 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: f3669dca-8853-4d85-914e-fb38172139b6 management: - docChecksum: 2aebc86864ba0cfb1b4613619ef07c00 + docChecksum: b22d691bcae87aa4189932224b5837cf docVersion: v1 - speakeasyVersion: 1.438.1 - generationVersion: 2.457.2 - releaseVersion: 0.2.35 - configChecksum: 5800034fa33113df58b1549582b885cf + speakeasyVersion: 1.439.0 + generationVersion: 2.457.9 + releaseVersion: 0.2.38 + configChecksum: 4074ae8f5c2f3a2d2f1143a51f893a14 repoURL: https://github.com/friendliai/friendli-python-internal.git installationURL: https://github.com/friendliai/friendli-python-internal.git published: true @@ -14,7 +14,7 @@ features: python: additionalDependencies: 1.0.0 constsAndDefaults: 1.0.4 - core: 5.6.4 + core: 5.6.5 defaultEnabledRetries: 0.2.0 enumUnions: 0.1.0 envVarSecurityUsage: 0.3.2 @@ -333,7 +333,7 @@ examples: application/json: {"model": "meta-llama-3.1-8b-instruct", "messages": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "What is 3 + 6?"}], "max_tokens": 200, "tools": [{"type": "math:statistics"}]} responses: "200": - text/event-stream: "event: tool_status\ndata: {\"tool_call_id\":\"call_3QrfStXSU6fGdOGPcETocIAq\",\"name\":\"math:calculator\",\"status\":\"STARTED\",\"parameters\":[{\"name\":\"expression\",\"value\":\"150 * 1.60934\"}],\"result\":\"None\",\"files\":null,\"message\":null,\"error\":null,\"usage\":null,\"timestamp\":1726277121}\n\nevent: tool_status\ndata: {\"tool_call_id\":\"call_3QrfStXSU6fGdOGPcETocIAq\",\"name\":\"math:calculator\",\"status\":\"ENDED\",\"parameters\":[{\"name\":\"expression\",\"value\":\"150 * 1.60934\"}],\"result\":\"\\\"{\\\\\\\"result\\\\\\\": \\\\\\\"150 * 1.60934=241.401000000000\\\\\\\"}\\\"\",\"files\":null,\"message\":null,\"error\":null,\"usage\":null,\"timestamp\":1726277121}\n\ndata: {\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"To\"},\"finish_reason\":null,\"logprobs\":null}],\"created\":1726277121}\n\n...\n\ndata: {\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\".\"},\"finish_reason\":null,\"logprobs\":null}],\"created\":1726277121}\n\ndata: {\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\",\"logprobs\":null}],\"created\":1726277121}\n\ndata: [DONE]\n" + text/event-stream: "event: tool_status\ndata: {\"tool_call_id\":\"call_3QrfStXSU6fGdOGPcETocIAq\",\"name\":\"math:calculator\",\"status\":\"STARTED\",\"parameters\":[{\"name\":\"expression\",\"value\":\"150 * 1.60934\"}],\"result\":null,\"files\":null,\"message\":null,\"error\":null,\"usage\":null,\"timestamp\":1726277121}\n\nevent: tool_status\ndata: {\"tool_call_id\":\"call_3QrfStXSU6fGdOGPcETocIAq\",\"name\":\"math:calculator\",\"status\":\"ENDED\",\"parameters\":[{\"name\":\"expression\",\"value\":\"150 * 1.60934\"}],\"result\":\"\\\"{\\\\\\\"result\\\\\\\": \\\\\\\"150 * 1.60934=241.401000000000\\\\\\\"}\\\"\",\"files\":null,\"message\":null,\"error\":null,\"usage\":null,\"timestamp\":1726277121}\n\ndata: {\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"To\"},\"finish_reason\":null,\"logprobs\":null}],\"created\":1726277121}\n\n...\n\ndata: {\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\".\"},\"finish_reason\":null,\"logprobs\":null}],\"created\":1726277121}\n\ndata: {\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\",\"logprobs\":null}],\"created\":1726277121}\n\ndata: [DONE]\n" serverlessCompletionsComplete: "": requestBody: diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 838c3ef..c9d2b2d 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -13,7 +13,7 @@ generation: oAuth2ClientCredentialsEnabled: true oAuth2PasswordEnabled: true python: - version: 0.2.35 + version: 0.2.38 additionalDependencies: dev: {} main: {} diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 1f17abf..4814d5c 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,9 +1,9 @@ -speakeasyVersion: 1.438.1 +speakeasyVersion: 1.439.0 sources: Friendli-API-Schema: sourceNamespace: friendli-api-schema - sourceRevisionDigest: sha256:9461dfc8e2ace328997e611f0e73fd5f954b16187000a58b0e58c4070ccbb54d - sourceBlobDigest: sha256:320a8f9b91d37b7a0363e9ccde4834d75fe5c4004d69f2f0399922cfd202afdf + sourceRevisionDigest: sha256:9f66621e1ba9c74283e076705384dcc3a1e8fcca9ebeda6baa007631076d0f7e + sourceBlobDigest: sha256:0e7c79ebe78313f9d03ac0a3df522e3c3e9e31c7724fe5daa3b529c205258966 tags: - latest - main @@ -11,10 +11,10 @@ targets: friendli: source: Friendli-API-Schema sourceNamespace: friendli-api-schema - sourceRevisionDigest: sha256:9461dfc8e2ace328997e611f0e73fd5f954b16187000a58b0e58c4070ccbb54d - sourceBlobDigest: sha256:320a8f9b91d37b7a0363e9ccde4834d75fe5c4004d69f2f0399922cfd202afdf + sourceRevisionDigest: sha256:9f66621e1ba9c74283e076705384dcc3a1e8fcca9ebeda6baa007631076d0f7e + sourceBlobDigest: sha256:0e7c79ebe78313f9d03ac0a3df522e3c3e9e31c7724fe5daa3b529c205258966 codeSamplesNamespace: friendli-api-schema-code-samples - codeSamplesRevisionDigest: sha256:1c557d58e59315667694ca3813e89a34b25a61746b15c279066a24fca782dcd4 + codeSamplesRevisionDigest: sha256:60031adf529b040d4087b047a470a5968f6603761fb6b68eca0188411551b11e workflow: workflowVersion: 1.0.0 speakeasyVersion: latest @@ -22,6 +22,8 @@ workflow: Friendli-API-Schema: inputs: - location: registry.speakeasyapi.dev/friendliai/friendliai/friendli-api-schema + transformations: + - cleanup: true targets: friendli: target: python diff --git a/.speakeasy/workflow.yaml b/.speakeasy/workflow.yaml index bc87f1e..e37095b 100644 --- a/.speakeasy/workflow.yaml +++ b/.speakeasy/workflow.yaml @@ -4,6 +4,8 @@ sources: Friendli-API-Schema: inputs: - location: registry.speakeasyapi.dev/friendliai/friendliai/friendli-api-schema + transformations: + - cleanup: true targets: friendli: target: python diff --git a/RELEASES.md b/RELEASES.md index 8321cad..b11e742 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -58,4 +58,24 @@ Based on: ### Generated - [python v0.2.35] . ### Releases -- [PyPI v0.2.35] https://pypi.org/project/friendli/0.2.35 - . \ No newline at end of file +- [PyPI v0.2.35] https://pypi.org/project/friendli/0.2.35 - . + +## 2024-11-13 09:33:20 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.438.1 (2.457.2) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v0.2.36] . +### Releases +- [PyPI v0.2.36] https://pypi.org/project/friendli/0.2.36 - . + +## 2024-11-14 01:13:35 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.439.0 (2.457.9) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v0.2.38] . +### Releases +- [PyPI v0.2.38] https://pypi.org/project/friendli/0.2.38 - . \ No newline at end of file diff --git a/docs/models/serverlesstoolassistedchatcompletebody.md b/docs/models/serverlesstoolassistedchatcompletebody.md index 817c770..67231de 100644 --- a/docs/models/serverlesstoolassistedchatcompletebody.md +++ b/docs/models/serverlesstoolassistedchatcompletebody.md @@ -23,6 +23,6 @@ | `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | Sampling temperature. Smaller temperature makes the generation result closer to greedy, argmax (i.e., `top_k = 1`) sampling. Defaults to 1.0. This is similar to Hugging Face's [`temperature`](https://huggingface.co/docs/transformers/v4.26.0/en/main_classes/text_generation#transformers.generationconfig.temperature) argument. | | | `timeout_microseconds` | *OptionalNullable[int]* | :heavy_minus_sign: | Request timeout. Gives the `HTTP 429 Too Many Requests` response status code. Default behavior is no timeout. | | | `tool_choice` | [Optional[models.ServerlessToolAssistedChatCompleteBodyToolChoice]](../models/serverlesstoolassistedchatcompletebodytoolchoice.md) | :heavy_minus_sign: | Determines the tool calling behavior of the model.
When set to `none`, the model will bypass tool execution and generate a response directly.
In `auto` mode (the default), the model dynamically decides whether to call a tool or respond with a message.
Alternatively, setting `required` ensures that the model invokes at least one tool before responding to the user.
You can also specify a particular tool by `{"type": "function", "function": {"name": "my_function"}}`.
| | -| `tools` | List[[models.ToolAssistedChatTool](../models/toolassistedchattool.md)] | :heavy_minus_sign: | A list of tools the model may call.
A maximum of 128 functions is supported.
Use this to provide a list of functions the model may generate JSON inputs for.
For more detailed information about each tool, please refer [here](https://friendli.ai/docs/guides/serverless_endpoints/tools/built_in_tools).

**When `tools` are specified, `min_tokens` field is unsupported.**
| math:calculator | +| `tools` | List[[models.ToolAssistedChatTool](../models/toolassistedchattool.md)] | :heavy_minus_sign: | A list of tools the model may call.
A maximum of 128 functions is supported.
Use this to provide a list of functions the model may generate JSON inputs for.
For more detailed information about each tool, please refer [here](https://friendli.ai/docs/guides/serverless_endpoints/tools/built_in_tools).

**When `tools` are specified, `min_tokens` field is unsupported.**
| | | `top_k` | *OptionalNullable[int]* | :heavy_minus_sign: | The number of highest probability tokens to keep for sampling. Numbers between 0 and the vocab size of the model (both inclusive) are allowed. The default value is 0, which means that the API does not apply top-k filtering. This is similar to Hugging Face's [`top_k`](https://huggingface.co/docs/transformers/v4.26.0/en/main_classes/text_generation#transformers.GenerationConfig.top_k) argument. | | | `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | Tokens comprising the top `top_p` probability mass are kept for sampling. Numbers between 0.0 (exclusive) and 1.0 (inclusive) are allowed. Defaults to 1.0. This is similar to Hugging Face's [`top_p`](https://huggingface.co/docs/transformers/v4.26.0/en/main_classes/text_generation#transformers.GenerationConfig.top_p) argument. | | \ No newline at end of file diff --git a/docs/models/serverlesstoolassistedchatstreambody.md b/docs/models/serverlesstoolassistedchatstreambody.md index 57f4701..78a12f7 100644 --- a/docs/models/serverlesstoolassistedchatstreambody.md +++ b/docs/models/serverlesstoolassistedchatstreambody.md @@ -23,6 +23,6 @@ | `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | Sampling temperature. Smaller temperature makes the generation result closer to greedy, argmax (i.e., `top_k = 1`) sampling. Defaults to 1.0. This is similar to Hugging Face's [`temperature`](https://huggingface.co/docs/transformers/v4.26.0/en/main_classes/text_generation#transformers.generationconfig.temperature) argument. | | | `timeout_microseconds` | *OptionalNullable[int]* | :heavy_minus_sign: | Request timeout. Gives the `HTTP 429 Too Many Requests` response status code. Default behavior is no timeout. | | | `tool_choice` | [Optional[models.ServerlessToolAssistedChatStreamBodyToolChoice]](../models/serverlesstoolassistedchatstreambodytoolchoice.md) | :heavy_minus_sign: | Determines the tool calling behavior of the model.
When set to `none`, the model will bypass tool execution and generate a response directly.
In `auto` mode (the default), the model dynamically decides whether to call a tool or respond with a message.
Alternatively, setting `required` ensures that the model invokes at least one tool before responding to the user.
You can also specify a particular tool by `{"type": "function", "function": {"name": "my_function"}}`.
| | -| `tools` | List[[models.ToolAssistedChatTool](../models/toolassistedchattool.md)] | :heavy_minus_sign: | A list of tools the model may call.
A maximum of 128 functions is supported.
Use this to provide a list of functions the model may generate JSON inputs for.
For more detailed information about each tool, please refer [here](https://friendli.ai/docs/guides/serverless_endpoints/tools/built_in_tools).

**When `tools` are specified, `min_tokens` field is unsupported.**
| math:calculator | +| `tools` | List[[models.ToolAssistedChatTool](../models/toolassistedchattool.md)] | :heavy_minus_sign: | A list of tools the model may call.
A maximum of 128 functions is supported.
Use this to provide a list of functions the model may generate JSON inputs for.
For more detailed information about each tool, please refer [here](https://friendli.ai/docs/guides/serverless_endpoints/tools/built_in_tools).

**When `tools` are specified, `min_tokens` field is unsupported.**
| | | `top_k` | *OptionalNullable[int]* | :heavy_minus_sign: | The number of highest probability tokens to keep for sampling. Numbers between 0 and the vocab size of the model (both inclusive) are allowed. The default value is 0, which means that the API does not apply top-k filtering. This is similar to Hugging Face's [`top_k`](https://huggingface.co/docs/transformers/v4.26.0/en/main_classes/text_generation#transformers.GenerationConfig.top_k) argument. | | | `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | Tokens comprising the top `top_p` probability mass are kept for sampling. Numbers between 0.0 (exclusive) and 1.0 (inclusive) are allowed. Defaults to 1.0. This is similar to Hugging Face's [`top_p`](https://huggingface.co/docs/transformers/v4.26.0/en/main_classes/text_generation#transformers.GenerationConfig.top_p) argument. | | \ No newline at end of file diff --git a/docs/sdks/toolassistedchat/README.md b/docs/sdks/toolassistedchat/README.md index 90d7246..9f171cc 100644 --- a/docs/sdks/toolassistedchat/README.md +++ b/docs/sdks/toolassistedchat/README.md @@ -66,7 +66,7 @@ if res is not None: | `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | Sampling temperature. Smaller temperature makes the generation result closer to greedy, argmax (i.e., `top_k = 1`) sampling. Defaults to 1.0. This is similar to Hugging Face's [`temperature`](https://huggingface.co/docs/transformers/v4.26.0/en/main_classes/text_generation#transformers.generationconfig.temperature) argument. | | | `timeout_microseconds` | *OptionalNullable[int]* | :heavy_minus_sign: | Request timeout. Gives the `HTTP 429 Too Many Requests` response status code. Default behavior is no timeout. | | | `tool_choice` | [Optional[models.ServerlessToolAssistedChatCompleteBodyToolChoice]](../../models/serverlesstoolassistedchatcompletebodytoolchoice.md) | :heavy_minus_sign: | Determines the tool calling behavior of the model.
When set to `none`, the model will bypass tool execution and generate a response directly.
In `auto` mode (the default), the model dynamically decides whether to call a tool or respond with a message.
Alternatively, setting `required` ensures that the model invokes at least one tool before responding to the user.
You can also specify a particular tool by `{"type": "function", "function": {"name": "my_function"}}`.
| | -| `tools` | List[[models.ToolAssistedChatTool](../../models/toolassistedchattool.md)] | :heavy_minus_sign: | A list of tools the model may call.
A maximum of 128 functions is supported.
Use this to provide a list of functions the model may generate JSON inputs for.
For more detailed information about each tool, please refer [here](https://friendli.ai/docs/guides/serverless_endpoints/tools/built_in_tools).

**When `tools` are specified, `min_tokens` field is unsupported.**
| math:calculator | +| `tools` | List[[models.ToolAssistedChatTool](../../models/toolassistedchattool.md)] | :heavy_minus_sign: | A list of tools the model may call.
A maximum of 128 functions is supported.
Use this to provide a list of functions the model may generate JSON inputs for.
For more detailed information about each tool, please refer [here](https://friendli.ai/docs/guides/serverless_endpoints/tools/built_in_tools).

**When `tools` are specified, `min_tokens` field is unsupported.**
| | | `top_k` | *OptionalNullable[int]* | :heavy_minus_sign: | The number of highest probability tokens to keep for sampling. Numbers between 0 and the vocab size of the model (both inclusive) are allowed. The default value is 0, which means that the API does not apply top-k filtering. This is similar to Hugging Face's [`top_k`](https://huggingface.co/docs/transformers/v4.26.0/en/main_classes/text_generation#transformers.GenerationConfig.top_k) argument. | | | `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | Tokens comprising the top `top_p` probability mass are kept for sampling. Numbers between 0.0 (exclusive) and 1.0 (inclusive) are allowed. Defaults to 1.0. This is similar to Hugging Face's [`top_p`](https://huggingface.co/docs/transformers/v4.26.0/en/main_classes/text_generation#transformers.GenerationConfig.top_p) argument. | | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | @@ -140,7 +140,7 @@ if res is not None: | `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | Sampling temperature. Smaller temperature makes the generation result closer to greedy, argmax (i.e., `top_k = 1`) sampling. Defaults to 1.0. This is similar to Hugging Face's [`temperature`](https://huggingface.co/docs/transformers/v4.26.0/en/main_classes/text_generation#transformers.generationconfig.temperature) argument. | | | `timeout_microseconds` | *OptionalNullable[int]* | :heavy_minus_sign: | Request timeout. Gives the `HTTP 429 Too Many Requests` response status code. Default behavior is no timeout. | | | `tool_choice` | [Optional[models.ServerlessToolAssistedChatStreamBodyToolChoice]](../../models/serverlesstoolassistedchatstreambodytoolchoice.md) | :heavy_minus_sign: | Determines the tool calling behavior of the model.
When set to `none`, the model will bypass tool execution and generate a response directly.
In `auto` mode (the default), the model dynamically decides whether to call a tool or respond with a message.
Alternatively, setting `required` ensures that the model invokes at least one tool before responding to the user.
You can also specify a particular tool by `{"type": "function", "function": {"name": "my_function"}}`.
| | -| `tools` | List[[models.ToolAssistedChatTool](../../models/toolassistedchattool.md)] | :heavy_minus_sign: | A list of tools the model may call.
A maximum of 128 functions is supported.
Use this to provide a list of functions the model may generate JSON inputs for.
For more detailed information about each tool, please refer [here](https://friendli.ai/docs/guides/serverless_endpoints/tools/built_in_tools).

**When `tools` are specified, `min_tokens` field is unsupported.**
| math:calculator | +| `tools` | List[[models.ToolAssistedChatTool](../../models/toolassistedchattool.md)] | :heavy_minus_sign: | A list of tools the model may call.
A maximum of 128 functions is supported.
Use this to provide a list of functions the model may generate JSON inputs for.
For more detailed information about each tool, please refer [here](https://friendli.ai/docs/guides/serverless_endpoints/tools/built_in_tools).

**When `tools` are specified, `min_tokens` field is unsupported.**
| | | `top_k` | *OptionalNullable[int]* | :heavy_minus_sign: | The number of highest probability tokens to keep for sampling. Numbers between 0 and the vocab size of the model (both inclusive) are allowed. The default value is 0, which means that the API does not apply top-k filtering. This is similar to Hugging Face's [`top_k`](https://huggingface.co/docs/transformers/v4.26.0/en/main_classes/text_generation#transformers.GenerationConfig.top_k) argument. | | | `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | Tokens comprising the top `top_p` probability mass are kept for sampling. Numbers between 0.0 (exclusive) and 1.0 (inclusive) are allowed. Defaults to 1.0. This is similar to Hugging Face's [`top_p`](https://huggingface.co/docs/transformers/v4.26.0/en/main_classes/text_generation#transformers.GenerationConfig.top_p) argument. | | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | diff --git a/pyproject.toml b/pyproject.toml index 8e96e9d..85dd432 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "friendli" -version = "0.2.35" +version = "0.2.38" description = "Python Client SDK Generated by Speakeasy." authors = ["Speakeasy",] readme = "README-PYPI.md" diff --git a/src/friendli/_version.py b/src/friendli/_version.py index f9d130b..2f89514 100644 --- a/src/friendli/_version.py +++ b/src/friendli/_version.py @@ -3,7 +3,7 @@ import importlib.metadata __title__: str = "friendli" -__version__: str = "0.2.35" +__version__: str = "0.2.38" try: if __package__ is not None: diff --git a/src/friendli/sdkconfiguration.py b/src/friendli/sdkconfiguration.py index c759f07..c5790cb 100644 --- a/src/friendli/sdkconfiguration.py +++ b/src/friendli/sdkconfiguration.py @@ -26,9 +26,9 @@ class SDKConfiguration: server_idx: Optional[int] = 0 language: str = "python" openapi_doc_version: str = "v1" - sdk_version: str = "0.2.35" - gen_version: str = "2.457.2" - user_agent: str = "speakeasy-sdk/python 0.2.35 2.457.2 v1 friendli" + sdk_version: str = "0.2.38" + gen_version: str = "2.457.9" + user_agent: str = "speakeasy-sdk/python 0.2.38 2.457.9 v1 friendli" retry_config: OptionalNullable[RetryConfig] = Field(default_factory=lambda: UNSET) timeout_ms: Optional[int] = None