MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / build

Method build

atomic-core/src/change/provenance/builder.rs:215–239  ·  view source on GitHub ↗

Build the provenance. # Panics Panics if vendor or model is not set.

(self)

Source from the content-addressed store, hash-verified

213 ///
214 /// Panics if vendor or model is not set.
215 pub fn build(self) -> Provenance {
216 Provenance {
217 vendor: self.vendor.unwrap_or_default(),
218 model: self.model.unwrap_or_default(),
219 model_version: self.model_version,
220 tool: self.tool.unwrap_or_default(),
221 suggestion_type: self.suggestion_type,
222 prompt: self.prompt,
223 system_prompt_hash: self.system_prompt_hash,
224 tokens: self.tokens,
225 cost: self.cost,
226 temperature: self.temperature,
227 timestamp: self.timestamp,
228 request_id: self.request_id,
229 session_id: self.session_id,
230 metadata: self.metadata,
231 agent_mode: self.agent_mode,
232 finish_reason: self.finish_reason,
233 step_count: self.step_count,
234 session_slug: self.session_slug,
235 reasoning_signature: self.reasoning_signature,
236 reasoning_text: self.reasoning_text,
237 task_plan: self.task_plan,
238 }
239 }
240
241 /// Try to build the provenance, returning an error if required fields are missing.
242 pub fn try_build(self) -> Result<Provenance, &'static str> {

Calls

no outgoing calls