ChatCompletion
or Completion
API, simply set your base URL to: api.novita.ai/v3/openai , get and set your API key, update the model name as needed to start using LLM services.
model
: The target LLM. See the full list on the LLM Service Page.
ChatCompletion Only
messages
: Inputs and outputs when interacting with LLM. Each message belongs to one character. Messages can help you get better outputs, you can try different methods to get better results.
content
: message content.role
: Define the speaker:
system
: Set the AI’s role, telling model its role or behavior.user
: The user’s input.assistant
: The AI’s response. Users can give examples of output in advance, telling model how to answer current request.name
(optional): separating message writers with same role.ChatCompletion Only
prompt
: Instruction text for generating a completion written by user to LLM to tell the model their task clearly.
‘temperature’ and ‘top_p’ can control the diversity of generated text, we advice you to set only one of them. The bigger the value you set, The more diverse the text will be. The smaller the value you set, The more accurate the text will be.
temperature
: Controls randomness. Higher = more creative.top_p
: Nucleus sampling. Controls cumulative probability.top_k
: Limits candidate token count.presence_penalty
: Controls repeated tokens of the texts. If one token has already existed in the text, penalty will come, this results in more token in the text.frequency_penalty
: Control token frequency of the texts. Every time the same token exist in the text, penalty will come, which results in less same token in the future in the text.repetition_penalty
: Penalizes or encourages repetition.max_tokens
: Max tokens in one response. Content after this value in the text will be truncated.stream
: Whether to use streaming. For those with long outputs, we advice you to use streaming mode to prevent timeout error:
true
: Streamed, partial results as they are generated.false
: Full result after processing.stop
: Strings that will terminate generation when encountered.