Package dev.braintrust.api
Record Class BraintrustApiClient.Function
java.lang.Object
java.lang.Record
dev.braintrust.api.BraintrustApiClient.Function
- Enclosing interface:
- BraintrustApiClient
public static record BraintrustApiClient.Function(String id, String projectId, String orgId, String name, String slug, Optional<String> description, String created, Optional<Object> functionData, Optional<Object> promptData, Optional<List<String>> tags, Optional<Object> metadata, Optional<String> functionType, Optional<Object> origin, Optional<Object> functionSchema)
extends Record
Represents a Braintrust function (scorer, prompt, tool, or task). Functions can be invoked
remotely via the API.
-
Constructor Summary
ConstructorsConstructorDescriptionFunction(String id, String projectId, String orgId, String name, String slug, Optional<String> description, String created, Optional<Object> functionData, Optional<Object> promptData, Optional<List<String>> tags, Optional<Object> metadata, Optional<String> functionType, Optional<Object> origin, Optional<Object> functionSchema) Creates an instance of aFunctionrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncreated()Returns the value of thecreatedrecord component.Returns the value of thedescriptionrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefunctionDatarecord component.Returns the value of thefunctionSchemarecord component.Returns the value of thefunctionTyperecord component.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.metadata()Returns the value of themetadatarecord component.name()Returns the value of thenamerecord component.orgId()Returns the value of theorgIdrecord component.origin()Returns the value of theoriginrecord component.Returns the value of theprojectIdrecord component.Returns the value of thepromptDatarecord component.slug()Returns the value of theslugrecord component.tags()Returns the value of thetagsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Function
public Function(String id, String projectId, String orgId, String name, String slug, Optional<String> description, String created, Optional<Object> functionData, Optional<Object> promptData, Optional<List<String>> tags, Optional<Object> metadata, Optional<String> functionType, Optional<Object> origin, Optional<Object> functionSchema) Creates an instance of aFunctionrecord class.- Parameters:
id- the value for theidrecord componentprojectId- the value for theprojectIdrecord componentorgId- the value for theorgIdrecord componentname- the value for thenamerecord componentslug- the value for theslugrecord componentdescription- the value for thedescriptionrecord componentcreated- the value for thecreatedrecord componentfunctionData- the value for thefunctionDatarecord componentpromptData- the value for thepromptDatarecord componenttags- the value for thetagsrecord componentmetadata- the value for themetadatarecord componentfunctionType- the value for thefunctionTyperecord componentorigin- the value for theoriginrecord componentfunctionSchema- the value for thefunctionSchemarecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
projectId
Returns the value of theprojectIdrecord component.- Returns:
- the value of the
projectIdrecord component
-
orgId
Returns the value of theorgIdrecord component.- Returns:
- the value of the
orgIdrecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
slug
Returns the value of theslugrecord component.- Returns:
- the value of the
slugrecord component
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
created
Returns the value of thecreatedrecord component.- Returns:
- the value of the
createdrecord component
-
functionData
Returns the value of thefunctionDatarecord component.- Returns:
- the value of the
functionDatarecord component
-
promptData
Returns the value of thepromptDatarecord component.- Returns:
- the value of the
promptDatarecord component
-
tags
Returns the value of thetagsrecord component.- Returns:
- the value of the
tagsrecord component
-
metadata
Returns the value of themetadatarecord component.- Returns:
- the value of the
metadatarecord component
-
functionType
Returns the value of thefunctionTyperecord component.- Returns:
- the value of the
functionTyperecord component
-
origin
Returns the value of theoriginrecord component.- Returns:
- the value of the
originrecord component
-
functionSchema
Returns the value of thefunctionSchemarecord component.- Returns:
- the value of the
functionSchemarecord component
-