Class: Braintrust::Models::Prompt
- Defined in:
- lib/braintrust/models/prompt.rb
Defined Under Namespace
Classes: FunctionType, LogID
Instance Attribute Summary collapse
-
#_xact_id ⇒ String
The transaction id of an event is unique to the network operation that processed the event insertion.
-
#created ⇒ DateTime
Date of prompt creation.
-
#description ⇒ String
Textual description of the prompt.
-
#function_type ⇒ Symbol
One of the constants defined in FunctionType.
-
#id ⇒ String
Unique identifier for the prompt.
-
#log_id ⇒ Symbol
A literal 'p' which identifies the object as a project prompt One of the constants defined in LogID.
-
#metadata ⇒ Hash
User-controlled metadata about the prompt.
-
#name_ ⇒ String
Name of the prompt.
-
#org_id ⇒ String
Unique identifier for the organization.
-
#project_id ⇒ String
Unique identifier for the project that the prompt belongs under.
-
#prompt_data ⇒ Braintrust::Models::PromptData
The prompt, model, and its parameters.
-
#slug ⇒ String
Unique identifier for the prompt.
-
#tags ⇒ Array<String>
A list of tags for the prompt.
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_id ⇒ String
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 |
#created ⇒ DateTime
Date of prompt creation
45 |
# File 'lib/braintrust/models/prompt.rb', line 45 optional :created, DateTime |
#description ⇒ String
Textual description of the prompt
50 |
# File 'lib/braintrust/models/prompt.rb', line 50 optional :description, String |
#function_type ⇒ Symbol
One of the constants defined in FunctionType
55 |
# File 'lib/braintrust/models/prompt.rb', line 55 optional :function_type, enum: -> { Braintrust::Models::Prompt::FunctionType } |
#id ⇒ String
Unique identifier for the prompt
9 |
# File 'lib/braintrust/models/prompt.rb', line 9 required :id, String |
#log_id ⇒ Symbol
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 } |
#metadata ⇒ Hash
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_id ⇒ String
Unique identifier for the organization
30 |
# File 'lib/braintrust/models/prompt.rb', line 30 required :org_id, String |
#project_id ⇒ String
Unique identifier for the project that the prompt belongs under
35 |
# File 'lib/braintrust/models/prompt.rb', line 35 required :project_id, String |
#prompt_data ⇒ Braintrust::Models::PromptData
The prompt, model, and its parameters
65 |
# File 'lib/braintrust/models/prompt.rb', line 65 optional :prompt_data, -> { Braintrust::Models::PromptData } |
#slug ⇒ String
Unique identifier for the prompt
40 |
# File 'lib/braintrust/models/prompt.rb', line 40 required :slug, String |
#tags ⇒ Array<String>
A list of tags for the prompt
70 |
# File 'lib/braintrust/models/prompt.rb', line 70 optional :tags, Braintrust::ArrayOf.new(String) |