Skip to content

Commit

Permalink
updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
vedpatwardhan committed Sep 10, 2024
1 parent 7047b8e commit 9650c0b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions api-reference/llm_queries/chat_completions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ Whether or not to drop unsupported OpenAI params by the provider you're using
</ParamField>

<ParamField body="region" type="string | null" >
A string used to represent the region where the endpoint is accessed. This is only relevant for certain providers like `vertex-ai`, `azure-ai` and `aws-bedrock`, where the endpoint is being accessed through a specified region.
A string used to represent the region where the endpoint is accessed. This is only relevant for certain providers like `vertex-ai` and `aws-bedrock`, where the endpoint is being accessed through a specified region.
</ParamField>

<RequestExample>
Expand Down Expand Up @@ -186,8 +186,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\"}}",
Expand All @@ -207,7 +207,7 @@ url = "https://api.unify.ai/v0/chat/completions"

headers = {"Authorization": "Bearer <token>"}

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": True, "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": True, "drop_params": True}

response = requests.request("POST", url, json=json_input, headers=headers)

Expand Down
6 changes: 3 additions & 3 deletions api-reference/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -3520,8 +3520,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": {
Expand Down Expand Up @@ -3643,7 +3643,7 @@
}
],
"title": "Region",
"description": "A string used to represent the region where the endpoint is accessed. This is only relevant for certain providers like `vertex-ai`, `azure-ai` and `aws-bedrock`, where the endpoint is being accessed through a specified region."
"description": "A string used to represent the region where the endpoint is accessed. This is only relevant for certain providers like `vertex-ai` and `aws-bedrock`, where the endpoint is being accessed through a specified region."
}
},
"additionalProperties": true,
Expand Down

0 comments on commit 9650c0b

Please sign in to comment.