POST
Goose AIGoose AICompletionsCreate completion
POST
https://api.lowcodeapi.com/gooseai/v1/engines/engine_id/completions
Query Parameters 1
engine_id*string
Parameters Description
engine_id*string
Engine Id
Request Body
Content Type : application/json
Request Parameters
promptstring
The prompt(s) to generate completions for, encoded as a string, array of strings, array of tokens, or array of token arrays
nnumber
n number of completions to perform per prompt
max_tokensnumber
The maximum number of tokens to generate in the completion
min_tokensnumber
The minimum number of tokens to generate in the completion
temperaturenumber
Whether to return log probabilities of the output tokens or not
top_pnumber
An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability
logit_biasnumber
Bias for or against the specified tokens appearing
stopstring
Stops completion when string or one of the strings in the array is encountered.
top_knumber
Truncates logits to the set value
tfsnumber
Number between 0 and 1.0. Similar to nucleus sampling, but it sets its cutoff point based on the cumulative sum of the accelerations (second derivatives) of the sorted token probabilities rather than the probabilities themselves
top_anumber
Number between 0 and 1.0
typical_pnumber
Number between 0 and 1.0. Selects tokens according to the expected amount of information they contribute.
streamboolean
Number between 0 and 1.0. Selects tokens according to the expected amount of information they contribute.
logprobsnumber
Include the log probabilities on the logprobs most likely tokens, as well the chosen tokens.
echoboolean
Echo back the prompt in addition to the completion
presence_penaltynumber
Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.
frequency_penaltynumber
Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.
repetition_penaltynumber
Number between 0 and 8.0. HuggingFace repetition penalty implementation, uses a divisor
repetition_penalty_slopenumber
Number between 0 and 1.0
repetition_penalty_rangenumber
Number between 0 and 2048. The token range to apply the repetition_penalty and repetition_penalty_slope
Overview

Given a prompt, the model will return one or more predicted completions, and can also return the probabilities of alternative tokens at each position.

API Reference Link
https://www.goose.ai/docs/api/completions
Response
API response data will be shown here once the request is completed.
Snippet
cURL
curl -X POST \
 'https://api.lowcodeapi.com/gooseai/v1/engines/engine_id/completions' \
 -H 'Cache-Control: no-cache' \
 -H 'Content-Type: application/json' --data-raw '{
  "prompt": "",
  "n": "",
  "max_tokens": "",
  "min_tokens": "",
  "temperature": "",
  "top_p": "",
  "logit_bias": "",
  "stop": "",
  "top_k": "",
  "tfs": "",
  "top_a": "",
  "typical_p": "",
  "stream": "",
  "logprobs": "",
  "echo": "",
  "presence_penalty": "",
  "frequency_penalty": "",
  "repetition_penalty": "",
  "repetition_penalty_slope": "",
  "repetition_penalty_range": ""
}'
© 2024LowCodeAPI

Last Updated : 2025-01-04 10:49 +00:00

Created by @samalgorai