diff --git a/api-reference/llm_queries/chat_completions.mdx b/api-reference/llm_queries/chat_completions.mdx index 09998023c..145fbd901 100644 --- a/api-reference/llm_queries/chat_completions.mdx +++ b/api-reference/llm_queries/chat_completions.mdx @@ -194,8 +194,8 @@ curl --request POST \ "response_format": "{ \"type\": \"json_mode\"}", "seed": 11, "stream_options": [ - true, - "include_usage" + "include_usage", + true ], "top_p": 0.5, "tool_choice": "{\"type\": \"function\", \"function\": {\"name\": \"my_function\"}}", @@ -218,7 +218,7 @@ url = "https://api.unify.ai/v0/chat/completions" headers = {"Authorization": "Bearer "} -json_input = {"messages": [{"content": "Tell me a joke", "role": "user"}], "model": "gpt-4o-mini@openai", "max_tokens": 1024, "stop": ["The End.", " is the answer."], "stream": False, "temperature": 0.9, "frequency_penalty": 1.5, "logit_bias": {"0": 10, "1": -75, "2": 90}, "logprobs": False, "top_logprobs": 15, "n": 15, "presence_penalty": -1.1, "response_format": "{ "type": "json_mode"}", "seed": 11, "stream_options": [True, "include_usage"], "top_p": 0.5, "tool_choice": "{"type": "function", "function": {"name": "my_function"}}", "parallel_tool_calls": True, "user": "some_user", "signature": "python", "use_custom_keys": True, "tags": ["user123", "CompanyABC"], "drop_params": True} +json_input = {"messages": [{"content": "Tell me a joke", "role": "user"}], "model": "gpt-4o-mini@openai", "max_tokens": 1024, "stop": ["The End.", " is the answer."], "stream": False, "temperature": 0.9, "frequency_penalty": 1.5, "logit_bias": {"0": 10, "1": -75, "2": 90}, "logprobs": False, "top_logprobs": 15, "n": 15, "presence_penalty": -1.1, "response_format": "{ "type": "json_mode"}", "seed": 11, "stream_options": ["include_usage", True], "top_p": 0.5, "tool_choice": "{"type": "function", "function": {"name": "my_function"}}", "parallel_tool_calls": True, "user": "some_user", "signature": "python", "use_custom_keys": True, "tags": ["user123", "CompanyABC"], "drop_params": True} response = requests.request("POST", url, json=json_input, headers=headers) diff --git a/api-reference/openapi.json b/api-reference/openapi.json index a555608ff..1091eb3d5 100644 --- a/api-reference/openapi.json +++ b/api-reference/openapi.json @@ -4036,8 +4036,8 @@ "title": "Stream Options", "description": "Options for streaming response. Only set this when you set `stream: true`.", "example": [ - true, - "include_usage" + "include_usage", + true ] }, "top_p": { diff --git a/python/chat/clients/base.mdx b/python/chat/clients/base.mdx index 773bda718..cd80d41c3 100644 --- a/python/chat/clients/base.mdx +++ b/python/chat/clients/base.mdx @@ -555,6 +555,11 @@ Set the default system message. **Arguments**: - `value` - The default system message. + + +**Returns**: + + This client, useful for chaining inplace calls. @@ -574,6 +579,11 @@ Set the default messages. **Arguments**: - `value` - The default messages. + + +**Returns**: + + This client, useful for chaining inplace calls. @@ -590,6 +600,11 @@ Set the default frequency penalty. **Arguments**: - `value` - The default frequency penalty. + + +**Returns**: + + This client, useful for chaining inplace calls. @@ -606,6 +621,11 @@ Set the default logit bias. **Arguments**: - `value` - The default logit bias. + + +**Returns**: + + This client, useful for chaining inplace calls. @@ -622,6 +642,11 @@ Set the default logprobs. **Arguments**: - `value` - The default logprobs. + + +**Returns**: + + This client, useful for chaining inplace calls. @@ -638,6 +663,11 @@ Set the default top logprobs. **Arguments**: - `value` - The default top logprobs. + + +**Returns**: + + This client, useful for chaining inplace calls. @@ -654,6 +684,11 @@ Set the default max tokens. **Arguments**: - `value` - The default max tokens. + + +**Returns**: + + This client, useful for chaining inplace calls. @@ -670,6 +705,11 @@ Set the default n value. **Arguments**: - `value` - The default n value. + + +**Returns**: + + This client, useful for chaining inplace calls. @@ -686,6 +726,11 @@ Set the default presence penalty. **Arguments**: - `value` - The default presence penalty. + + +**Returns**: + + This client, useful for chaining inplace calls. @@ -702,6 +747,11 @@ Set the default response format. **Arguments**: - `value` - The default response format. + + +**Returns**: + + This client, useful for chaining inplace calls. @@ -718,6 +768,11 @@ Set the default seed value. **Arguments**: - `value` - The default seed value. + + +**Returns**: + + This client, useful for chaining inplace calls. @@ -734,6 +789,11 @@ Set the default stop value. **Arguments**: - `value` - The default stop value. + + +**Returns**: + + This client, useful for chaining inplace calls. @@ -750,6 +810,11 @@ Set the default stream bool. **Arguments**: - `value` - The default stream bool. + + +**Returns**: + + This client, useful for chaining inplace calls. @@ -766,6 +831,11 @@ Set the default stream options. **Arguments**: - `value` - The default stream options. + + +**Returns**: + + This client, useful for chaining inplace calls. @@ -782,6 +852,11 @@ Set the default temperature. **Arguments**: - `value` - The default temperature. + + +**Returns**: + + This client, useful for chaining inplace calls. @@ -798,6 +873,11 @@ Set the default top p value. **Arguments**: - `value` - The default top p value. + + +**Returns**: + + This client, useful for chaining inplace calls. @@ -814,6 +894,11 @@ Set the default tools. **Arguments**: - `value` - The default tools. + + +**Returns**: + + This client, useful for chaining inplace calls. @@ -830,6 +915,11 @@ Set the default tool choice. **Arguments**: - `value` - The default tool choice. + + +**Returns**: + + This client, useful for chaining inplace calls. @@ -846,6 +936,11 @@ Set the default parallel tool calls bool. **Arguments**: - `value` - The default parallel tool calls bool. + + +**Returns**: + + This client, useful for chaining inplace calls. @@ -862,6 +957,11 @@ Set the default use custom keys bool. **Arguments**: - `value` - The default use custom keys bool. + + +**Returns**: + + This client, useful for chaining inplace calls. @@ -878,6 +978,11 @@ Set the default tags. **Arguments**: - `value` - The default tags. + + +**Returns**: + + This client, useful for chaining inplace calls. @@ -894,6 +999,11 @@ Set the default drop params bool. **Arguments**: - `value` - The default drop params bool. + + +**Returns**: + + This client, useful for chaining inplace calls. @@ -910,6 +1020,11 @@ Set the default region. **Arguments**: - `value` - The default region. + + +**Returns**: + + This client, useful for chaining inplace calls. @@ -926,6 +1041,11 @@ Set the default log query body bool. **Arguments**: - `value` - The default log query body bool. + + +**Returns**: + + This client, useful for chaining inplace calls. @@ -942,6 +1062,11 @@ Set the default log response body bool. **Arguments**: - `value` - The default log response body bool. + + +**Returns**: + + This client, useful for chaining inplace calls. @@ -958,6 +1083,11 @@ Set the default return full completion bool. **Arguments**: - `value` - The default return full completion bool. + + +**Returns**: + + This client, useful for chaining inplace calls. @@ -974,6 +1104,11 @@ Set the default cache bool. **Arguments**: - `value` - The default cache bool. + + +**Returns**: + + This client, useful for chaining inplace calls. @@ -990,6 +1125,11 @@ Set the default extra headers. **Arguments**: - `value` - The default extra headers. + + +**Returns**: + + This client, useful for chaining inplace calls. @@ -1006,6 +1146,11 @@ Set the default extra query. **Arguments**: - `value` - The default extra query. + + +**Returns**: + + This client, useful for chaining inplace calls. @@ -1022,6 +1167,11 @@ Set the default extra body. **Arguments**: - `value` - The default extra body. + + +**Returns**: + + This client, useful for chaining inplace calls. @@ -1038,6 +1188,11 @@ Set the default prompt. **Arguments**: The default prompt. + + +**Returns**: + + This client, useful for chaining inplace calls. diff --git a/python/chat/clients/uni_llm.mdx b/python/chat/clients/uni_llm.mdx index d360c4cb3..1b07c19c4 100644 --- a/python/chat/clients/uni_llm.mdx +++ b/python/chat/clients/uni_llm.mdx @@ -269,6 +269,11 @@ Set the endpoint name. **Arguments**: - `value` - The endpoint name. + + +**Returns**: + + This client, useful for chaining inplace calls. @@ -285,6 +290,11 @@ Set the model name. **Arguments**: - `value` - The model name. + + +**Returns**: + + This client, useful for chaining inplace calls. @@ -301,6 +311,11 @@ Set the provider name. **Arguments**: - `value` - The provider name. + + +**Returns**: + + This client, useful for chaining inplace calls.