MCPcopy Create free account
hub / github.com/ChrisFeldmeier/OpenCodeRust / new

Method new

crates/opencode-provider/src/message.rs:213–226  ·  view source on GitHub ↗
(model: impl Into<String>, messages: Vec<Message>)

Source from the content-addressed store, hash-verified

211
212impl ChatRequest {
213 pub fn new(model: impl Into<String>, messages: Vec<Message>) -> Self {
214 Self {
215 model: model.into(),
216 messages,
217 max_tokens: None,
218 temperature: None,
219 top_p: None,
220 system: None,
221 tools: None,
222 stream: Some(true),
223 provider_options: None,
224 variant: None,
225 }
226 }
227
228 pub fn with_temperature(mut self, temp: f32) -> Self {
229 self.temperature = Some(temp);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected