Last active
February 26, 2023 12:37
-
-
Save chrisobriensp/47a5a19fc02d831f3afb5561ac1155da to your computer and use it in GitHub Desktop.
Azure OpenAI - Power Platform custom connector
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
swagger: '2.0' | |
info: | |
title: Default title | |
description: Azure OpenAI - Completions API | |
version: '1.0' | |
host: [YOUR ENDPOINT PREFIX HERE].openai.azure.com | |
basePath: /openai | |
schemes: | |
- https | |
consumes: [] | |
produces: [] | |
paths: | |
/deployments/{deployment-id}/completions: | |
post: | |
responses: | |
default: | |
description: default | |
schema: | |
type: object | |
properties: | |
id: | |
type: string | |
description: id | |
object: | |
type: string | |
description: object | |
created: | |
type: integer | |
format: int32 | |
description: created | |
model: | |
type: string | |
description: model | |
choices: | |
type: array | |
items: | |
type: object | |
properties: | |
text: | |
type: string | |
description: text | |
index: | |
type: integer | |
format: int32 | |
description: index | |
logprobs: | |
type: string | |
description: logprobs | |
finish_reason: | |
type: string | |
description: finish_reason | |
description: choices | |
usage: | |
type: object | |
properties: | |
prompt_tokens: | |
type: integer | |
format: int32 | |
description: prompt_tokens | |
completion_tokens: | |
type: integer | |
format: int32 | |
description: completion_tokens | |
total_tokens: | |
type: integer | |
format: int32 | |
description: total_tokens | |
description: usage | |
parameters: | |
- name: deployment-id | |
in: path | |
required: true | |
type: string | |
default: [YOUR DEPLOYMENT ID HERE] | |
x-ms-visibility: important | |
- name: api-version | |
in: query | |
required: true | |
type: string | |
default: '2022-12-01' | |
x-ms-visibility: important | |
- name: Content-Type | |
in: header | |
required: true | |
default: application/json | |
type: string | |
- name: body | |
in: body | |
required: false | |
schema: | |
type: object | |
properties: | |
prompt: | |
type: string | |
description: >- | |
The prompt(s) to generate completions for, encoded as a string | |
or array of strings.\nNote that <|endoftext|> is the document | |
separator that the model sees during training, so if a prompt | |
is not specified the model will generate as if from the | |
beginning of a new document. Maximum allowed size of string | |
list is 2048. | |
max_tokens: | |
type: integer | |
description: >- | |
The token count of your prompt plus max_tokens cannot exceed | |
the model's context length. Most models have a context length | |
of 2048 tokens (except for the newest models, which support | |
4096). Has minimum of 0. | |
temperature: | |
type: number | |
description: >- | |
What sampling temperature to use. Higher values means the | |
model will take more risks. Try 0.9 for more creative | |
applications, and 0 (argmax sampling) for ones with a | |
well-defined answer.\nWe generally recommend altering this or | |
top_p but not both. | |
operationId: Completions | |
summary: Completions | |
description: Completions API | |
x-ms-visibility: important | |
definitions: {} | |
parameters: {} | |
responses: {} | |
securityDefinitions: | |
API Key: | |
type: apiKey | |
in: header | |
name: api-key | |
security: | |
- API Key: [] | |
tags: [] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment