Class: Braintrust::Models::Function

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

Defined Under Namespace

Classes: FunctionSchema, FunctionType, LogID, Origin

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)

Returns:

  • (String)


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

required :_xact_id, String

#createdDateTime

Date of prompt creation

Returns:

  • (DateTime)


49
# File 'lib/braintrust/models/function.rb', line 49

optional :created, DateTime

#descriptionString

Textual description of the prompt

Returns:

  • (String)


54
# File 'lib/braintrust/models/function.rb', line 54

optional :description, String

#function_dataBraintrust::Models::Function::FunctionData::UnnamedTypeWithunionParent2|Braintrust::Models::Function::FunctionData::UnnamedTypeWithunionParent3|Braintrust::Models::Function::FunctionData::UnnamedTypeWithunionParent4

Returns:

  • (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_schemaBraintrust::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_typeSymbol

One of the constants defined in FunctionType

Returns:

  • (Symbol)


64
# File 'lib/braintrust/models/function.rb', line 64

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

#idString

Unique identifier for the prompt

Returns:

  • (String)


9
# File 'lib/braintrust/models/function.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

Returns:

  • (Symbol)


24
# File 'lib/braintrust/models/function.rb', line 24

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

#metadataHash

User-controlled metadata about the prompt

Returns:

  • (Hash)


69
# File 'lib/braintrust/models/function.rb', line 69

optional :metadata, Hash

#name_String

Name of the prompt

Returns:

  • (String)


29
# File 'lib/braintrust/models/function.rb', line 29

required :name_, String

#org_idString

Unique identifier for the organization

Returns:

  • (String)


34
# File 'lib/braintrust/models/function.rb', line 34

required :org_id, String

#originBraintrust::Models::Function::Origin



73
# File 'lib/braintrust/models/function.rb', line 73

optional :origin, -> { Braintrust::Models::Function::Origin }

#project_idString

Unique identifier for the project that the prompt belongs under

Returns:

  • (String)


39
# File 'lib/braintrust/models/function.rb', line 39

required :project_id, String

#prompt_dataBraintrust::Models::PromptData

The prompt, model, and its parameters



78
# File 'lib/braintrust/models/function.rb', line 78

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

#slugString

Unique identifier for the prompt

Returns:

  • (String)


44
# File 'lib/braintrust/models/function.rb', line 44

required :slug, String

#tagsArray<String>

A list of tags for the prompt

Returns:

  • (Array<String>)


83
# File 'lib/braintrust/models/function.rb', line 83

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