Class: Braintrust::Models::Prompt

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/braintrust/models/prompt.rb

Defined Under Namespace

Classes: FunctionType, LogID

Instance Attribute Summary collapse

Method Summary

Methods inherited from BaseModel

#[], #initialize, #inspect, #to_h, #to_s

Constructor Details

This class inherits a constructor from Braintrust::BaseModel

Instance Attribute Details

#_xact_idString

The transaction id of an event is unique to the network operation that processed the event insertion. Transaction ids are monotonically increasing over time and can be used to retrieve a versioned snapshot of the prompt (see the version parameter)



14
# File 'lib/braintrust/models/prompt.rb', line 14

required :_xact_id, String

#createdDateTime

Date of prompt creation



45
# File 'lib/braintrust/models/prompt.rb', line 45

optional :created, DateTime

#descriptionString

Textual description of the prompt



50
# File 'lib/braintrust/models/prompt.rb', line 50

optional :description, String

#function_typeSymbol

One of the constants defined in FunctionType



55
# File 'lib/braintrust/models/prompt.rb', line 55

optional :function_type, enum: -> { Braintrust::Models::Prompt::FunctionType }

#idString

Unique identifier for the prompt



9
# File 'lib/braintrust/models/prompt.rb', line 9

required :id, String

#log_idSymbol

A literal 'p' which identifies the object as a project prompt One of the constants defined in LogID



20
# File 'lib/braintrust/models/prompt.rb', line 20

required :log_id, enum: -> { Braintrust::Models::Prompt::LogID }

#metadataHash

User-controlled metadata about the prompt



60
# File 'lib/braintrust/models/prompt.rb', line 60

optional :metadata, Hash

#name_String

Name of the prompt



25
# File 'lib/braintrust/models/prompt.rb', line 25

required :name_, String

#org_idString

Unique identifier for the organization



30
# File 'lib/braintrust/models/prompt.rb', line 30

required :org_id, String

#project_idString

Unique identifier for the project that the prompt belongs under



35
# File 'lib/braintrust/models/prompt.rb', line 35

required :project_id, String

#prompt_dataBraintrust::Models::PromptData

The prompt, model, and its parameters



65
# File 'lib/braintrust/models/prompt.rb', line 65

optional :prompt_data, -> { Braintrust::Models::PromptData }

#slugString

Unique identifier for the prompt



40
# File 'lib/braintrust/models/prompt.rb', line 40

required :slug, String

#tagsArray<String>

A list of tags for the prompt



70
# File 'lib/braintrust/models/prompt.rb', line 70

optional :tags, Braintrust::ArrayOf.new(String)