You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`llm.WithTemperature(float64)`| Yes | Yes | Yes | - | What sampling temperature to use, between 0.0 and 1.0. Higher values like 0.7 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. |
126
147
|`llm.WithTopP(float64)`| Yes | Yes | Yes | - | Nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. |
127
148
|`llm.WithTopK(uint64)`| Yes | Yes | No | - | Reduces the probability of generating nonsense. A higher value (e.g. 100) will give more diverse answers, while a lower value (e.g. 10) will be more conservative. |
128
149
|`llm.WithMaxTokens(uint64)`| - | Yes | Yes | - | The maximum number of tokens to generate in the response. |
129
-
|`llm.WithStream(func(llm.ContextContent))`| Can be enabled when tools are not used | Yes | Yes | - | Stream the response to a function. |
150
+
|`llm.WithStream(func(llm.Completion))`| Can be enabled when tools are not used | Yes | Yes | - | Stream the response to a function. |
130
151
|`llm.WithToolChoice(string, string, ...)`| No | Yes | Use `auto`, `any`, `none`, `required` or a function name. Only the first argument is used. | - | The tool to use for the model. |
131
152
|`llm.WithToolKit(llm.ToolKit)`| Cannot be combined with streaming | Yes | Yes | - | The set of tools to use. |
132
153
|`llm.WithStopSequence(string, string, ...)`| Yes | Yes | Yes | - | Stop generation if one of these tokens is detected. |
133
154
|`llm.WithSystemPrompt(string)`| No | Yes | Yes | - | Set the system prompt for the model. |
134
155
|`llm.WithSeed(uint64)`| No | Yes | Yes | - | The seed to use for random sampling. If set, different calls will generate deterministic results. |
135
156
|`llm.WithFormat(string)`| No | Yes | Use `json_format` or `text`| - | The format of the response. For Mistral, you must also instruct the model to produce JSON yourself with a system or a user message. |
136
-
|`mistral.WithPresencePenalty(float64)`|-|-| Yes | - | Determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. |
137
-
|`mistral.WithFequencyPenalty(float64)`|-|-| Yes | - | Penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. |
138
-
|`mistral.WithPrediction(string)`|-|-| Yes | - | Enable users to specify expected results, optimizing response times by leveraging known or predictable content. This approach is especially effective for updating text documents or code files with minimal changes, reducing latency while maintaining high-quality results. |
139
-
|`llm.WithSafePrompt()`|-|-| Yes | - | Whether to inject a safety prompt before all conversations. |
140
-
|`llm.WithNumCompletions(uint64)`|-|-| Yes | - | Number of completions to return for each request. |
157
+
|`mistral.WithPresencePenalty(float64)`|No|No| Yes | - | Determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. |
158
+
|`mistral.WithFequencyPenalty(float64)`|No|No| Yes | - | Penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. |
159
+
|`mistral.WithPrediction(string)`|No|No| Yes | - | Enable users to specify expected results, optimizing response times by leveraging known or predictable content. This approach is especially effective for updating text documents or code files with minimal changes, reducing latency while maintaining high-quality results. |
160
+
|`llm.WithSafePrompt()`|No|No| Yes | - | Whether to inject a safety prompt before all conversations. |
161
+
|`llm.WithNumCompletions(uint64)`|No|No| Yes | - | Number of completions to return for each request. |
141
162
|`llm.WithAttachment(io.Reader)`| Yes | Yes | Yes | - | Attach a file to a user prompt. It is the responsibility of the caller to close the reader. |
142
163
|`antropic.WithEphemeral()`| No | Yes | No | - | Attachments should be cached server-side |
143
164
|`antropic.WithCitations()`| No | Yes | No | - | Attachments should be used in citations |
0 commit comments