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_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)

Returns:

  • (String)


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

required :_xact_id, String

#created ⇒ DateTime

Date of prompt creation

Returns:

  • (DateTime)


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

optional :created, DateTime

#description ⇒ String

Textual description of the prompt

Returns:

  • (String)


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

optional :description, String

#function_type ⇒ Symbol

One of the constants defined in FunctionType

Returns:

  • (Symbol)


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

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

#id ⇒ String

Unique identifier for the prompt

Returns:

  • (String)


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

Returns:

  • (Symbol)


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

Returns:

  • (Hash)


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

optional :metadata, Hash

#name_ ⇒ String

Name of the prompt

Returns:

  • (String)


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

required :name_, String

#org_id ⇒ String

Unique identifier for the organization

Returns:

  • (String)


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

Returns:

  • (String)


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

Returns:

  • (String)


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

required :slug, String

#tags ⇒ Array<String>

A list of tags for the prompt

Returns:

  • (Array<String>)


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

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