Interface: CohereTextGenerationModelSettings
Hierarchy
-
↳
CohereTextGenerationModelSettings
Properties
api
• Optional
api: ApiConfiguration
Defined in
packages/modelfusion/src/model-provider/cohere/CohereTextGenerationModel.ts:46
cohereStopSequences
• Optional
cohereStopSequences: string
[]
Defined in
packages/modelfusion/src/model-provider/cohere/CohereTextGenerationModel.ts:59
frequencyPenalty
• Optional
frequencyPenalty: number
Defined in
packages/modelfusion/src/model-provider/cohere/CohereTextGenerationModel.ts:53
k
• Optional
k: number
Defined in
packages/modelfusion/src/model-provider/cohere/CohereTextGenerationModel.ts:51
logitBias
• Optional
logitBias: Record
<string
, number
>
Defined in
packages/modelfusion/src/model-provider/cohere/CohereTextGenerationModel.ts:56
maxGenerationTokens
• Optional
maxGenerationTokens: number
Specifies the maximum number of tokens (words, punctuation, parts of words) that the model can generate in a single response. It helps to control the length of the output.
Does nothing if the model does not support this setting.
Example: maxGenerationTokens: 1000
Inherited from
TextGenerationModelSettings.maxGenerationTokens
Defined in
packages/modelfusion/src/model-function/generate-text/TextGenerationModel.ts:28
model
• model: "command"
| "command-light"
Defined in
packages/modelfusion/src/model-provider/cohere/CohereTextGenerationModel.ts:48
numberOfGenerations
• Optional
numberOfGenerations: number
Number of texts to generate.
Specifies the number of responses or completions the model should generate for a given prompt. This is useful when you need multiple different outputs or ideas for a single prompt. The model will generate 'n' distinct responses, each based on the same initial prompt. In a streaming model this will result in both responses streamed back in real time.
Does nothing if the model does not support this setting.
Example: numberOfGenerations: 3
// The model will produce 3 different responses.
Inherited from
TextGenerationModelSettings.numberOfGenerations
Defined in
packages/modelfusion/src/model-function/generate-text/TextGenerationModel.ts:55
observers
• Optional
observers: FunctionObserver
[]
Observers that are called when the model is used in run functions.
Inherited from
TextGenerationModelSettings.observers
Defined in
packages/modelfusion/src/model-function/Model.ts:8
p
• Optional
p: number
Defined in
packages/modelfusion/src/model-provider/cohere/CohereTextGenerationModel.ts:52
presencePenalty
• Optional
presencePenalty: number
Defined in
packages/modelfusion/src/model-provider/cohere/CohereTextGenerationModel.ts:54
returnLikelihoods
• Optional
returnLikelihoods: "GENERATION"
| "ALL"
| "NONE"
Defined in
packages/modelfusion/src/model-provider/cohere/CohereTextGenerationModel.ts:55
stopSequences
• Optional
stopSequences: string
[]
Stop sequences to use. Stop sequences are an array of strings or a single string that the model will recognize as end-of-text indicators. The model stops generating more content when it encounters any of these strings. This is particularly useful in scripted or formatted text generation, where a specific end point is required. Stop sequences not included in the generated text.
Does nothing if the model does not support this setting.
Example: stopSequences: ['\n', 'END']
Inherited from
TextGenerationModelSettings.stopSequences
Defined in
packages/modelfusion/src/model-function/generate-text/TextGenerationModel.ts:41
temperature
• Optional
temperature: number
Defined in
packages/modelfusion/src/model-provider/cohere/CohereTextGenerationModel.ts:50
trimWhitespace
• Optional
trimWhitespace: boolean
When true, the leading and trailing white space and line terminator characters are removed from the generated text.
Default: true.
Inherited from
TextGenerationModelSettings.trimWhitespace
Defined in
packages/modelfusion/src/model-function/generate-text/TextGenerationModel.ts:63
truncate
• Optional
truncate: "NONE"
| "START"
| "END"
Defined in
packages/modelfusion/src/model-provider/cohere/CohereTextGenerationModel.ts:57