Class: Braintrust::Models::Function
- Defined in:
- lib/braintrust/models/function.rb
Defined Under Namespace
Classes: FunctionSchema, FunctionType, LogID, Origin
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_data ⇒ Braintrust::Models::Function::FunctionData::UnnamedTypeWithunionParent2|Braintrust::Models::Function::FunctionData::UnnamedTypeWithunionParent3|Braintrust::Models::Function::FunctionData::UnnamedTypeWithunionParent4
-
#function_schema ⇒ Braintrust::Models::Function::FunctionSchema
JSON schema for the function's parameters and return type.
-
#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.
- #origin ⇒ Braintrust::Models::Function::Origin
-
#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/function.rb', line 14 required :_xact_id, String |
#created ⇒ DateTime
Date of prompt creation
49 |
# File 'lib/braintrust/models/function.rb', line 49 optional :created, DateTime |
#description ⇒ String
Textual description of the prompt
54 |
# File 'lib/braintrust/models/function.rb', line 54 optional :description, String |
#function_data ⇒ Braintrust::Models::Function::FunctionData::UnnamedTypeWithunionParent2|Braintrust::Models::Function::FunctionData::UnnamedTypeWithunionParent3|Braintrust::Models::Function::FunctionData::UnnamedTypeWithunionParent4
18 |
# File 'lib/braintrust/models/function.rb', line 18 required :function_data, Braintrust::Unknown |
#function_schema ⇒ Braintrust::Models::Function::FunctionSchema
JSON schema for the function's parameters and return type
59 |
# File 'lib/braintrust/models/function.rb', line 59 optional :function_schema, -> { Braintrust::Models::Function::FunctionSchema } |
#function_type ⇒ Symbol
One of the constants defined in FunctionType
64 |
# File 'lib/braintrust/models/function.rb', line 64 optional :function_type, enum: -> { Braintrust::Models::Function::FunctionType } |
#id ⇒ String
Unique identifier for the prompt
9 |
# File 'lib/braintrust/models/function.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
24 |
# File 'lib/braintrust/models/function.rb', line 24 required :log_id, enum: -> { Braintrust::Models::Function::LogID } |
#metadata ⇒ Hash
User-controlled metadata about the prompt
69 |
# File 'lib/braintrust/models/function.rb', line 69 optional :metadata, Hash |
#name_ ⇒ String
Name of the prompt
29 |
# File 'lib/braintrust/models/function.rb', line 29 required :name_, String |
#org_id ⇒ String
Unique identifier for the organization
34 |
# File 'lib/braintrust/models/function.rb', line 34 required :org_id, String |
#origin ⇒ Braintrust::Models::Function::Origin
73 |
# File 'lib/braintrust/models/function.rb', line 73 optional :origin, -> { Braintrust::Models::Function::Origin } |
#project_id ⇒ String
Unique identifier for the project that the prompt belongs under
39 |
# File 'lib/braintrust/models/function.rb', line 39 required :project_id, String |
#prompt_data ⇒ Braintrust::Models::PromptData
The prompt, model, and its parameters
78 |
# File 'lib/braintrust/models/function.rb', line 78 optional :prompt_data, -> { Braintrust::Models::PromptData } |
#slug ⇒ String
Unique identifier for the prompt
44 |
# File 'lib/braintrust/models/function.rb', line 44 required :slug, String |
#tags ⇒ Array<String>
A list of tags for the prompt
83 |
# File 'lib/braintrust/models/function.rb', line 83 optional :tags, Braintrust::ArrayOf.new(String) |