Skip to content

Commit

Permalink
feat: Updated OpenAPI spec
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Nov 27, 2024
1 parent 11717c2 commit 5885ec2
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions src/libs/Cohere/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -762,13 +762,17 @@ paths:
model:
type: string
description: 'The name of a compatible [Cohere model](https://docs.cohere.com/v2/docs/models) (such as command-r or command-r-plus) or the ID of a [fine-tuned](https://docs.cohere.com/v2/docs/chat-fine-tuning) model.'
x-fern-audiences:
- public
messages:
$ref: '#/components/schemas/ChatMessages'
tools:
type: array
items:
$ref: '#/components/schemas/ToolV2'
description: "A list of available tools (functions) that the model may suggest invoking before producing a text response.\n\nWhen `tools` is passed (without `tool_results`), the `text` content in the response will be empty and the `tool_calls` field in the response will be populated with a list of tool calls that need to be made. If no calls need to be made, the `tool_calls` array will be empty.\n"
x-fern-audiences:
- public
strict_tools:
type: boolean
description: "When set to `true`, tool calls in the Assistant message will be forced to follow the tool definition strictly. Learn more in the [Strict Tools guide](https://docs.cohere.com/docs/structured-outputs-json#structured-outputs-tools).\n\n**Note**: The first few requests with a new set of tools will take longer to process.\n"
Expand All @@ -782,6 +786,8 @@ paths:
- type: string
- $ref: '#/components/schemas/Document'
description: "A list of relevant documents that the model can cite to generate a more accurate reply. Each document is either a string or document object with content and metadata.\n"
x-fern-audiences:
- public
citation_options:
$ref: '#/components/schemas/CitationOptions'
response_format:
Expand All @@ -792,50 +798,70 @@ paths:
- STRICT
- OFF
description: "Used to select the [safety instruction](https://docs.cohere.com/v2/docs/safety-modes) inserted into the prompt. Defaults to `CONTEXTUAL`.\nWhen `OFF` is specified, the safety instruction will be omitted.\n\nSafety modes are not yet configurable in combination with `tools`, `tool_results` and `documents` parameters.\n\n**Note**: This parameter is only compatible with models [Command R 08-2024](https://docs.cohere.com/v2/docs/command-r#august-2024-release), [Command R+ 08-2024](https://docs.cohere.com/v2/docs/command-r-plus#august-2024-release) and newer.\n"
x-fern-audiences:
- public
max_tokens:
type: integer
description: "The maximum number of tokens the model will generate as part of the response.\n\n**Note**: Setting a low value may result in incomplete generations.\n"
x-fern-audiences:
- public
stop_sequences:
type: array
items:
type: string
description: "A list of up to 5 strings that the model will use to stop generation. If the model generates a string that matches any of the strings in the list, it will stop generating tokens and return the generated text up to that point not including the stop sequence.\n"
x-fern-audiences:
- public
temperature:
maximum: 1
minimum: 0
type: number
description: "Defaults to `0.3`.\n\nA non-negative float that tunes the degree of randomness in generation. Lower temperatures mean less random generations, and higher temperatures mean more random generations.\n\nRandomness can be further maximized by increasing the value of the `p` parameter.\n"
format: float
x-fern-audiences:
- public
seed:
maximum: 18446744073709552000
minimum: 0
type: integer
description: "If specified, the backend will make a best effort to sample tokens\ndeterministically, such that repeated requests with the same\nseed and parameters should return the same result. However,\ndeterminism cannot be totally guaranteed.\n"
x-fern-audiences:
- public
frequency_penalty:
type: number
description: "Defaults to `0.0`, min value of `0.0`, max value of `1.0`.\nUsed to reduce repetitiveness of generated tokens. The higher the value, the stronger a penalty is applied to previously present tokens, proportional to how many times they have already appeared in the prompt or prior generation.\n"
format: float
x-fern-audiences:
- public
presence_penalty:
type: number
description: "Defaults to `0.0`, min value of `0.0`, max value of `1.0`.\nUsed to reduce repetitiveness of generated tokens. Similar to `frequency_penalty`, except that this penalty is applied equally to all tokens that have already appeared, regardless of their exact frequencies.\n"
format: float
x-fern-audiences:
- public
k:
maximum: 500
minimum: 0
type: number
description: "Ensures that only the top `k` most likely tokens are considered for generation at each step. When `k` is set to `0`, k-sampling is disabled.\nDefaults to `0`, min value of `0`, max value of `500`.\n"
format: float
default: 0
x-fern-audiences:
- public
p:
maximum: 0.99
minimum: 0.01
type: number
description: "Ensures that only the most likely tokens, with total probability mass of `p`, are considered for generation at each step. If both `k` and `p` are enabled, `p` acts after `k`.\nDefaults to `0.75`. min value of `0.01`, max value of `0.99`.\n"
format: float
default: 0.75
x-fern-audiences:
- public
logprobs:
type: boolean
description: "Defaults to `false`. When set to `true`, the log probabilities of the generated tokens will be included in the response.\n"
x-fern-audiences:
- public
responses:
'200':
description: OK
Expand Down

0 comments on commit 5885ec2

Please sign in to comment.