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

Method build

atomic-core/src/change/provenance/builder.rs:214–238  ·  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

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

Callers 7

test_provenance_builderFunction · 0.45
test_provenance_summaryFunction · 0.45
test_provenance_displayFunction · 0.45
try_buildMethod · 0.45

Calls

no outgoing calls