Skip to content

Commit

Permalink
updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
vedpatwardhan committed Sep 3, 2024
1 parent d0a52d6 commit 3e29a23
Show file tree
Hide file tree
Showing 22 changed files with 38 additions and 88 deletions.
9 changes: 7 additions & 2 deletions api-reference/llm_queries/chat_completions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,10 @@ Whether or not to use custom API keys with the specified provider, meaning that
Comma-separated list of tags to associate with the corresponding prompt.
</ParamField>

<ParamField body="drop_params" type="boolean" default={true}>
Whether or not to drop unsupported OpenAI params by the provider you're using
</ParamField>

<RequestExample>

```bash cURL
Expand Down Expand Up @@ -187,7 +191,8 @@ curl --request POST \
"user": "some_user",
"signature": "python",
"use_custom_keys": true,
"tags": true
"tags": true,
"drop_params": true
}'
```

Expand All @@ -198,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": [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}
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
7 changes: 7 additions & 0 deletions api-reference/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -3393,6 +3393,13 @@
"title": "Tags",
"description": "Comma-separated list of tags to associate with the corresponding prompt.",
"example": true
},
"drop_params": {
"type": "boolean",
"title": "Drop Params",
"description": "Whether or not to drop unsupported OpenAI params by the provider you're using",
"default": true,
"example": true
}
},
"additionalProperties": true,
Expand Down
36 changes: 17 additions & 19 deletions mint.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,26 +100,24 @@
"pages": [
"python/dataset",
"python/evaluation",
"python/evaluator",
"python/exceptions",
"python/queries",
"python/queries.chat",
"python/queries.clients",
"python/queries.multi_llm",
"python/utils",
"python/utils.credits",
"python/utils.custom_api_keys",
"python/utils.custom_endpoints",
"python/utils.datasets",
"python/utils.efficiency_benchmarks",
"python/utils.evaluations",
"python/utils.evaluators",
"python/utils.helpers",
"python/utils.logging",
"python/utils.router_configurations",
"python/utils.router_deployment",
"python/utils.router_training",
"python/utils.supported_endpoints"
{
"group": "queries",
"pages": [
"python/queries/chat",
"python/queries/clients",
"python/queries/multi_llm"
]
},
{
"group": "utils",
"pages": [
"python/utils/credits",
"python/utils/datasets",
"python/utils/evaluations",
"python/utils/supported_endpoints"
]
}
]
},
{
Expand Down
5 changes: 0 additions & 5 deletions python/evaluator.mdx

This file was deleted.

5 changes: 0 additions & 5 deletions python/queries.mdx

This file was deleted.

2 changes: 1 addition & 1 deletion python/queries.chat.mdx → python/queries/chat.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: 'queries.chat'
title: 'chat'
---

<a id="queries.chat.ChatBot"></a>
Expand Down
2 changes: 1 addition & 1 deletion python/queries.clients.mdx → python/queries/clients.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: 'queries.clients'
title: 'clients'
---

<a id="queries.clients.Client"></a>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: 'queries.multi_llm'
title: 'multi_llm'
---

<a id="queries.multi_llm.MultiLLMClient"></a>
Expand Down
5 changes: 0 additions & 5 deletions python/utils.custom_api_keys.mdx

This file was deleted.

5 changes: 0 additions & 5 deletions python/utils.custom_endpoints.mdx

This file was deleted.

5 changes: 0 additions & 5 deletions python/utils.efficiency_benchmarks.mdx

This file was deleted.

5 changes: 0 additions & 5 deletions python/utils.evaluators.mdx

This file was deleted.

5 changes: 0 additions & 5 deletions python/utils.helpers.mdx

This file was deleted.

5 changes: 0 additions & 5 deletions python/utils.logging.mdx

This file was deleted.

5 changes: 0 additions & 5 deletions python/utils.mdx

This file was deleted.

5 changes: 0 additions & 5 deletions python/utils.router_configurations.mdx

This file was deleted.

5 changes: 0 additions & 5 deletions python/utils.router_deployment.mdx

This file was deleted.

5 changes: 0 additions & 5 deletions python/utils.router_training.mdx

This file was deleted.

2 changes: 1 addition & 1 deletion python/utils.credits.mdx → python/utils/credits.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: 'utils.credits'
title: 'credits'
---

<a id="utils.credits.get_credits"></a>
Expand Down
2 changes: 1 addition & 1 deletion python/utils.datasets.mdx → python/utils/datasets.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: 'utils.datasets'
title: 'datasets'
---

<a id="utils.datasets.upload_dataset_from_file"></a>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: 'utils.evaluations'
title: 'evaluations'
---

<a id="utils.evaluations.trigger_evaluation"></a>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: 'utils.supported_endpoints'
title: 'supported_endpoints'
---

<a id="utils.supported_endpoints.list_providers"></a>
Expand Down

0 comments on commit 3e29a23

Please sign in to comment.