OptionaladditionalAdditional results from parallel execution, ranked by judge Index 0 = second best, Index 1 = third best, etc. (The best result is the main result object itself)
OptionalcacheCache information if caching was involved
OptionalcancellationReason for cancellation if applicable
OptionalcancelledWhether the execution was cancelled
The ChatResult object containing the full response from the AI model, many of the properties of this object are included in the result object
OptionalcombinedFor hierarchical prompts: Combined completion tokens including all child prompts. This provides a rollup of all completion tokens generated in the entire execution tree.
OptionalcombinedFor hierarchical prompts: Combined cost including all child prompts. This provides a rollup of all costs in the entire execution tree. The currency should match the costCurrency field.
OptionalcombinedFor hierarchical prompts: Combined prompt tokens including all child prompts. This provides a rollup of all prompt tokens used in the entire execution tree.
OptionalcombinedFor hierarchical prompts: Combined total tokens (combinedPromptTokens + combinedCompletionTokens). Note: This is a computed value - when creating objects, you don't need to set this.
OptionalcompletionNumber of tokens generated in the completion/output. This follows the ModelUsage convention from @memberjunction/ai
OptionalcostCost of this execution if provided by the AI provider. The currency is specified in the costCurrency field.
OptionalcostISO 4217 currency code for the cost field. Examples: 'USD', 'EUR', 'GBP', 'JPY', etc.
OptionalerrorError message if execution failed
OptionalexecutionTotal execution time in milliseconds
OptionaljudgeMetadata about the judging process (only present on the main result)
OptionaljudgeJudge's rationale for this ranking
OptionalmediaMedia generated during this prompt execution. Contains references to AIPromptRunMedia records with full metadata. This provides complete audit trail of all generated media.
OptionalmodelModel information for this result
OptionalmodelModel selection information for debugging and analysis
OptionalpromptThe AIPromptRun entity that was created for tracking
OptionalpromptNumber of tokens used in the prompt/input. This follows the ModelUsage convention from @memberjunction/ai
OptionalrankingRanking assigned by judge (1 = best, 2 = second best, etc.)
OptionalrawThe raw result from the AI model
OptionalresultThe parsed/validated result based on OutputType
OptionalstatusCurrent execution status
Whether the execution was successful
OptionaltokensTotal tokens used (promptTokens + completionTokens). Note: This is a computed value - when creating objects, you don't need to set this.
OptionalvalidationDetailed information about all validation attempts made
OptionalvalidationValidation result if output validation was performed
OptionalwasWhether streaming was used for this execution
Result of an AI prompt execution with generic type for the result