Skip to content

Commit

Permalink
updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
vedpatwardhan committed Sep 4, 2024
1 parent 5d1b7df commit 0f72a1e
Show file tree
Hide file tree
Showing 15 changed files with 17 additions and 17 deletions.
6 changes: 3 additions & 3 deletions api-reference/llm_queries/chat_completions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,8 @@ curl --request POST \
"response_format": "{ \"type\": \"json_mode\"}",
"seed": 11,
"stream_options": [
"include_usage",
true
true,
"include_usage"
],
"top_p": 0.5,
"tool_choice": "{\"type\": \"function\", \"function\": {\"name\": \"my_function\"}}",
Expand All @@ -203,7 +203,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": ["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}
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}

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

Expand Down
4 changes: 2 additions & 2 deletions api-reference/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -3506,8 +3506,8 @@
"title": "Stream Options",
"description": "Options for streaming response. Only set this when you set `stream: true`.",
"example": [
"include_usage",
true
true,
"include_usage"
]
},
"top_p": {
Expand Down
2 changes: 1 addition & 1 deletion python/evaluation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -265,4 +265,4 @@ from the other subtracted dataset.

- `other` - The other dataset being added to this one.

<a id="__init__"></a>
<a id="evaluator"></a>
2 changes: 1 addition & 1 deletion python/exceptions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,4 @@ class InternalServerError(UnifyError)

Exception raised for HTTP 500 Internal Server Error errors.

<a id="evaluator"></a>
<a id="_caching"></a>
1 change: 1 addition & 0 deletions python/queries/chat.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -207,3 +207,4 @@ Starts the chat interaction loop.
- `show_credits` - Whether to show credit consumption. Defaults to False.
- `show_provider` - Whether to show the provider used. Defaults to False.

<a id="queries.multi_llm"></a>
2 changes: 1 addition & 1 deletion python/queries/clients.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -362,4 +362,4 @@ class AsyncUnify(Client)
Class for interacting with the Unify chat completions endpoint in a synchronous
manner.

<a id="queries.multi_llm"></a>
<a id="queries.chat"></a>
1 change: 0 additions & 1 deletion python/queries/multi_llm.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -188,4 +188,3 @@ Generate content using the Unify API.

- `UnifyError` - If an error occurs during content generation.

<a id="queries.chat"></a>
2 changes: 1 addition & 1 deletion python/utils/credits.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ Returns the credits remaining in the user account, in USD.

- `ValueError` - If there was an HTTP error.

<a id="utils.efficiency_benchmarks"></a>
<a id="utils.router_training"></a>
2 changes: 1 addition & 1 deletion python/utils/custom_api_keys.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -143,4 +143,4 @@ Get a list of custom API keys associated with the user's account.
A list of dictionaries containing custom API key information.
Each dictionary has 'name' and 'value' keys.

<a id="utils.evaluators"></a>
<a id="utils.helpers"></a>
2 changes: 1 addition & 1 deletion python/utils/custom_endpoints.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -129,4 +129,4 @@ Get a list of custom endpoints for the authenticated user.

- `requests.exceptions.RequestException` - If the API request fails.

<a id="utils.supported_endpoints"></a>
<a id="utils.evaluators"></a>
2 changes: 1 addition & 1 deletion python/utils/datasets.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -147,4 +147,4 @@ Fetches a list of all uploaded datasets.

- `ValueError` - If there was an HTTP error.

<a id="utils.logging"></a>
<a id="utils.supported_endpoints"></a>
2 changes: 1 addition & 1 deletion python/utils/evaluations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -161,4 +161,4 @@ Get the evaluation status for a specific dataset, endpoint, and evaluator.

A dictionary containing the evaluation status information.

<a id="utils.helpers"></a>
<a id="utils.custom_api_keys"></a>
2 changes: 1 addition & 1 deletion python/utils/evaluators.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -136,4 +136,4 @@ Get a list of available evaluators.

A list of available evaluator names if successful, otherwise an empty list.

<a id="utils.router_training"></a>
<a id="queries"></a>
2 changes: 1 addition & 1 deletion python/utils/logging.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,4 @@ Get query metrics for specified parameters.

A dictionary containing the query metrics.

<a id="utils.custom_api_keys"></a>
<a id="utils.router_deployment"></a>
2 changes: 1 addition & 1 deletion python/utils/supported_endpoints.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,4 @@ provider.
- `BadRequestError` - If there was an HTTP error.
- `ValueError` - If there was an error parsing the JSON response.

<a id="utils.router_deployment"></a>
<a id="utils.efficiency_benchmarks"></a>

0 comments on commit 0f72a1e

Please sign in to comment.