API

@julep/sdk / Modules / api

Module: api

Table of contents

References

Classes

Type Aliases

Variables

References

JulepApiClient

Re-exports JulepApiClient

Type Aliases

Agent

Ζ¬ Agent: Object

Type declaration

NameTypeDescription

about?

string

About the agent

created_at?

string

Agent created at (RFC-3339 format)

default_settings?

Default settings for all sessions created by this agent

id

string

Agent id (UUID)

instructions?

string | string[]

Instructions for the agent

metadata?

any

Optional metadata

model

string

The model to use with this agent

name

string

Name of the agent

updated_at?

string

Agent updated at (RFC-3339 format)

Defined in

src/api/models/Agent.ts:6


AgentDefaultSettings

Ζ¬ AgentDefaultSettings: Object

Type declaration

NameTypeDescription

frequency_penalty?

number | null

(OpenAI-like) Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.

length_penalty?

number | null

(Huggingface-like) Number between 0 and 2.0. 1.0 is neutral and values larger than that penalize number of tokens generated.

min_p?

number

Minimum probability compared to leading token to be considered

presence_penalty?

number | null

(OpenAI-like) Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.

preset?

"problem_solving" | "conversational" | "fun" | "prose" | "creative" | "business" | "deterministic" | "code" | "multilingual"

Generation preset name (one of: problem_solving, conversational, fun, prose, creative, business, deterministic, code, multilingual)

repetition_penalty?

number | null

(Huggingface-like) Number between 0 and 2.0. 1.0 is neutral and values larger than that penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.

temperature?

number | null

What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.

top_p?

number | null

Defaults to 1 An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or temperature but not both.

Defined in

src/api/models/AgentDefaultSettings.ts:5


ChatInput

Ζ¬ ChatInput: ChatInputData & ChatSettings & MemoryAccessOptions

Defined in

src/api/models/ChatInput.ts:8


ChatInputData

Ζ¬ ChatInputData: Object

Type declaration

NameTypeDescription

messages

A list of new input messages comprising the conversation so far.

tool_choice?

Can be one of existing tools given to the agent earlier or the ones included in the request

tools?

Tool[] | null

(Advanced) List of tools that are provided in addition to agent's default set of tools. Functions of same name in agent set are overriden

Defined in

src/api/models/ChatInputData.ts:9


ChatMLImageContentPart

Ζ¬ ChatMLImageContentPart: Object

Type declaration

NameTypeDescription

image_url

{ detail?: "low" | "high" | "auto" ; url: string }

Image content part, can be a URL or a base64-encoded image

image_url.detail?

"low" | "high" | "auto"

image detail to feed into the model can be low | high | auto

image_url.url

string

URL or base64 data url (e.g. data:image/jpeg;base64,<the base64 encoded image>)

type

"image_url"

Fixed to 'image_url'

Defined in

src/api/models/ChatMLImageContentPart.ts:5


ChatMLMessage

Ζ¬ ChatMLMessage: Object

Type declaration

NameTypeDescription

content

string

ChatML content

created_at

string

Message created at (RFC-3339 format)

id

string

Message ID

name?

string

ChatML name

role

"user" | "assistant" | "system" | "function_call" | "function"

ChatML role (system|assistant|user|function_call|function)

Defined in

src/api/models/ChatMLMessage.ts:5


ChatMLTextContentPart

Ζ¬ ChatMLTextContentPart: Object

Type declaration

NameTypeDescription

text

string

Text content part

type

"text"

Fixed to 'text'

Defined in

src/api/models/ChatMLTextContentPart.ts:5


ChatResponse

Ζ¬ ChatResponse: Object

Represents a chat completion response returned by model, based on the provided input.

Type declaration

NameTypeDescription

doc_ids

-

finish_reason

"stop" | "length" | "tool_calls" | "content_filter" | "function_call"

The reason the model stopped generating tokens. This will be stop if the model hit a natural stop point or a provided stop sequence, length if the maximum number of tokens specified in the request was reached, content_filter if content was omitted due to a flag from our content filters, tool_calls if the model called a tool, or function_call (deprecated) if the model called a function.

id

string

A unique identifier for the chat completion.

jobs?

string[]

IDs (if any) of jobs created as part of this request

response

A list of chat completion messages produced as a response.

usage

-

Defined in

src/api/models/ChatResponse.ts:11


ChatSettings

Ζ¬ ChatSettings: Object

Type declaration

NameTypeDescription

frequency_penalty?

number | null

(OpenAI-like) Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.

length_penalty?

number | null

(Huggingface-like) Number between 0 and 2.0. 1.0 is neutral and values larger than that penalize number of tokens generated.

logit_bias?

Record<string, number> | null

Modify the likelihood of specified tokens appearing in the completion. Accepts a JSON object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token.

max_tokens?

number | null

The maximum number of tokens to generate in the chat completion. The total length of input tokens and generated tokens is limited by the model's context length.

min_p?

number

Minimum probability compared to leading token to be considered

presence_penalty?

number | null

(OpenAI-like) Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.

preset?

"problem_solving" | "conversational" | "fun" | "prose" | "creative" | "business" | "deterministic" | "code" | "multilingual"

Generation preset name (problem_solving|conversational|fun|prose|creative|business|deterministic|code|multilingual)

repetition_penalty?

number | null

(Huggingface-like) Number between 0 and 2.0. 1.0 is neutral and values larger than that penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.

response_format?

{ pattern?: string ; schema?: any ; type?: "text" | "json_object" | "regex" }

An object specifying the format that the model must output. Setting to { "type": "json_object" } enables JSON mode, which guarantees the message the model generates is valid JSON. Important: when using JSON mode, you must also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly "stuck" request. Also note that the message content may be partially cut off if finish_reason="length", which indicates the generation exceeded max_tokens or the conversation exceeded the max context length.

response_format.pattern?

string

Regular expression pattern to use if type is "regex"

response_format.schema?

any

JSON Schema to use if type is "json_object"

response_format.type?

"text" | "json_object" | "regex"

Must be one of "text", "regex" or "json_object".

seed?

number | null

This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed, and you should refer to the system_fingerprint response parameter to monitor changes in the backend.

stop?

string | null | string[]

Up to 4 sequences where the API will stop generating further tokens.

stream?

boolean | null

If set, partial message deltas will be sent, like in ChatGPT. Tokens will be sent as data-only server-sent events as they become available, with the stream terminated by a data: [DONE] message. Example Python code.

temperature?

number | null

What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.

top_p?

number | null

Defaults to 1 An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or temperature but not both.

Defined in

src/api/models/ChatSettings.ts:5


CompletionUsage

Ζ¬ CompletionUsage: Object

Usage statistics for the completion request.

Type declaration

NameTypeDescription

completion_tokens

number

Number of tokens in the generated completion.

prompt_tokens

number

Number of tokens in the prompt.

total_tokens

number

Total number of tokens used in the request (prompt + completion).

Defined in

src/api/models/CompletionUsage.ts:8


CreateAgentRequest

Ζ¬ CreateAgentRequest: Object

A valid request payload for creating an agent

Type declaration

NameTypeDescription

about?

string

About the agent

default_settings?

Default model settings to start every session with

docs?

List of docs about agent

instructions?

string | string[]

Instructions for the agent

metadata?

any

(Optional) metadata

model?

string

Name of the model that the agent is supposed to use

name

string

Name of the agent

tools?

A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for.

Defined in

src/api/models/CreateAgentRequest.ts:11


CreateDoc

Ζ¬ CreateDoc: Object

Type declaration

NameTypeDescription

content

string[] | string

Information content

metadata?

any

Optional metadata

title

string

Title describing what this bit of information contains

Defined in

src/api/models/CreateDoc.ts:5


CreateSessionRequest

Ζ¬ CreateSessionRequest: Object

A valid request payload for creating a session

Type declaration

NameTypeDescription

agent_id

string

Agent ID of agent to associate with this session

context_overflow?

string

Action to start on context window overflow

metadata?

any

Optional metadata

render_templates?

boolean

Render system and assistant message content as jinja templates

situation?

string

A specific situation that sets the background for this session

token_budget?

number

Threshold value for the adaptive context functionality

user_id?

string

(Optional) User ID of user to associate with this session

Defined in

src/api/models/CreateSessionRequest.ts:8


CreateToolRequest

Ζ¬ CreateToolRequest: Object

Type declaration

NameTypeDescription

function

Function definition and parameters

type

"function" | "webhook"

Whether this tool is a function or a webhook (Only function tool supported right now)

Defined in

src/api/models/CreateToolRequest.ts:6


CreateUserRequest

Ζ¬ CreateUserRequest: Object

A valid request payload for creating a user

Type declaration

NameTypeDescription

about?

string

About the user

docs?

List of docs about user

metadata?

any

(Optional) metadata

name?

string

Name of the user

Defined in

src/api/models/CreateUserRequest.ts:9


Doc

Ζ¬ Doc: Object

Type declaration

NameTypeDescription

content

string[] | string

Information content

created_at

string

Doc created at

id

string

ID of doc

metadata?

any

optional metadata

title

string

Title describing what this bit of information contains

Defined in

src/api/models/Doc.ts:5


DocIds

Ζ¬ DocIds: Object

Type declaration

NameType

agent_doc_ids

string[]

user_doc_ids

string[]

Defined in

src/api/models/DocIds.ts:5


FunctionCallOption

Ζ¬ FunctionCallOption: Object

Specifying a particular function via {"name": "my_function"} forces the model to call that function.

Type declaration

NameTypeDescription

name

string

The name of the function to call.

Defined in

src/api/models/FunctionCallOption.ts:9


FunctionDef

Ζ¬ FunctionDef: Object

Type declaration

NameTypeDescription

description?

string

A description of what the function does, used by the model to choose when and how to call the function.

name

string

The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.

parameters

Parameters accepeted by this function

Defined in

src/api/models/FunctionDef.ts:6


FunctionParameters

Ζ¬ FunctionParameters: Record<string, any>

The parameters the functions accepts, described as a JSON Schema object.

Defined in

src/api/models/FunctionParameters.ts:8


InputChatMLMessage

Ζ¬ InputChatMLMessage: Object

Type declaration

NameTypeDescription

content

string

ChatML content

continue?

boolean

Whether to continue this message or return a new one

name?

string

ChatML name

role

"user" | "assistant" | "system" | "function_call" | "function" | "auto"

ChatML role (system|assistant|user|function_call|function|auto)

Defined in

src/api/models/InputChatMLMessage.ts:5


JobStatus

Ζ¬ JobStatus: Object

Type declaration

NameTypeDescription

created_at

string

Job created at (RFC-3339 format)

has_progress?

boolean

Whether this Job supports progress updates

id

string

Job id (UUID)

name

string

Name of the job

progress?

number

Progress percentage

reason?

string

Reason for current state

state

"pending" | "in_progress" | "retrying" | "succeeded" | "aborted" | "failed" | "unknown"

Current state (one of: pending, in_progress, retrying, succeeded, aborted, failed)

updated_at?

string

Job updated at (RFC-3339 format)

Defined in

src/api/models/JobStatus.ts:5


Memory

Ζ¬ Memory: Object

Type declaration

NameTypeDescription

agent_id

string

ID of the agent

content

string

Content of the memory

created_at

string

Memory created at (RFC-3339 format)

entities

any[]

List of entities mentioned in the memory

id

string

Memory id (UUID)

last_accessed_at?

string

Memory last accessed at (RFC-3339 format)

sentiment?

number

Sentiment (valence) of the memory on a scale of -1 to 1

timestamp?

string

Memory happened at (RFC-3339 format)

user_id

string

ID of the user

Defined in

src/api/models/Memory.ts:5


MemoryAccessOptions

Ζ¬ MemoryAccessOptions: Object

Type declaration

NameTypeDescription

recall?

boolean

Whether previous memories should be recalled or not

record?

boolean

Whether this interaction should be recorded in history or not

remember?

boolean

Whether this interaction should form memories or not

Defined in

src/api/models/MemoryAccessOptions.ts:5


NamedToolChoice

Ζ¬ NamedToolChoice: Object

Specifies a tool the model should use. Use to force the model to call a specific function.

Type declaration

NameTypeDescription

function

{ name: string }

-

function.name

string

The name of the function to call.

type

"function"

The type of the tool. Currently, only function is supported.

Defined in

src/api/models/NamedToolChoice.ts:8


OpenAPIConfig

Ζ¬ OpenAPIConfig: Object

Type declaration

NameType

BASE

string

CREDENTIALS

"include" | "omit" | "same-origin"

ENCODE_PATH?

(path: string) => string

HEADERS?

Headers | Resolver<Headers>

PASSWORD?

string | Resolver<string>

TOKEN?

string | Resolver<string>

USERNAME?

string | Resolver<string>

VERSION

string

WITH_CREDENTIALS

boolean

Defined in

src/api/core/OpenAPI.ts:10


PartialFunctionDef

Ζ¬ PartialFunctionDef: Object

Type declaration

NameTypeDescription

description?

string

A description of what the function does, used by the model to choose when and how to call the function.

name?

string

The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.

parameters?

Parameters accepeted by this function

Defined in

src/api/models/PartialFunctionDef.ts:6


PatchAgentRequest

Ζ¬ PatchAgentRequest: Object

A request for patching an agent

Type declaration

NameTypeDescription

about?

string

About the agent

default_settings?

Default model settings to start every session with

instructions?

string | string[]

Instructions for the agent

metadata?

any

Optional metadata

model?

string

Name of the model that the agent is supposed to use

name?

string

Name of the agent

Defined in

src/api/models/PatchAgentRequest.ts:9


PatchSessionRequest

Ζ¬ PatchSessionRequest: Object

A request for patching a session

Type declaration

NameTypeDescription

context_overflow?

string

Action to start on context window overflow

metadata?

any

Optional metadata

situation?

string

Updated situation for this session

token_budget?

number

Threshold value for the adaptive context functionality

Defined in

src/api/models/PatchSessionRequest.ts:8


PatchToolRequest

Ζ¬ PatchToolRequest: Object

Type declaration

NameTypeDescription

function

Function definition and parameters

Defined in

src/api/models/PatchToolRequest.ts:6


PatchUserRequest

Ζ¬ PatchUserRequest: Object

A request for patching a user

Type declaration

NameTypeDescription

about?

string

About the user

metadata?

any

Optional metadata

name?

string

Name of the user

Defined in

src/api/models/PatchUserRequest.ts:8


ResourceCreatedResponse

Ζ¬ ResourceCreatedResponse: Object

Type declaration

NameTypeDescription

created_at

string

-

id

string

-

jobs?

string[]

IDs (if any) of jobs created as part of this request

Defined in

src/api/models/ResourceCreatedResponse.ts:5


ResourceDeletedResponse

Ζ¬ ResourceDeletedResponse: Object

Type declaration

NameTypeDescription

deleted_at

string

-

id

string

-

jobs?

string[]

IDs (if any) of jobs created as part of this request

Defined in

src/api/models/ResourceDeletedResponse.ts:5


ResourceUpdatedResponse

Ζ¬ ResourceUpdatedResponse: Object

Type declaration

NameTypeDescription

id

string

-

jobs?

string[]

IDs (if any) of jobs created as part of this request

updated_at

string

-

Defined in

src/api/models/ResourceUpdatedResponse.ts:5


Session

Ζ¬ Session: Object

Type declaration

NameTypeDescription

agent_id

string

Agent ID of agent associated with this session

context_overflow?

string

Action to start on context window overflow

created_at?

string

Session created at (RFC-3339 format)

id

string

Session id (UUID)

metadata?

any

Optional metadata

render_templates?

boolean

Render system and assistant message content as jinja templates

situation?

string

A specific situation that sets the background for this session

summary?

string

(null at the beginning) - generated automatically after every interaction

token_budget?

number

Threshold value for the adaptive context functionality

updated_at?

string

Session updated at (RFC-3339 format)

user_id?

string

User ID of user associated with this session

Defined in

src/api/models/Session.ts:5


Suggestion

Ζ¬ Suggestion: Object

Type declaration

NameTypeDescription

content

string

The content of the suggestion

created_at?

string

Suggestion created at (RFC-3339 format)

message_id

string

The message that produced it

session_id

string

Session this suggestion belongs to

target

"user" | "agent"

Whether the suggestion is for the agent or a user

Defined in

src/api/models/Suggestion.ts:5


Tool

Ζ¬ Tool: Object

Type declaration

NameTypeDescription

function

Function definition and parameters

id

string

Tool ID

type

"function" | "webhook"

Whether this tool is a function or a webhook (Only function tool supported right now)

Defined in

src/api/models/Tool.ts:6


ToolChoiceOption

Ζ¬ ToolChoiceOption: "none" | "auto" | NamedToolChoice

Controls which (if any) function is called by the model. none means the model will not call a function and instead generates a message. auto means the model can pick between generating a message or calling a function. Specifying a particular function via {"type: "function", "function": {"name": "my_function"}} forces the model to call that function.

none is the default when no functions are present. auto is the default if functions are present.

Defined in

src/api/models/ToolChoiceOption.ts:15


UpdateAgentRequest

Ζ¬ UpdateAgentRequest: Object

A valid request payload for updating an agent

Type declaration

NameTypeDescription

about

string

About the agent

default_settings?

Default model settings to start every session with

instructions?

string | string[]

Instructions for the agent

metadata?

any

Optional metadata

model?

string

Name of the model that the agent is supposed to use

name

string

Name of the agent

Defined in

src/api/models/UpdateAgentRequest.ts:9


UpdateSessionRequest

Ζ¬ UpdateSessionRequest: Object

A valid request payload for updating a session

Type declaration

NameTypeDescription

context_overflow?

string

Action to start on context window overflow

metadata?

any

Optional metadata

situation

string

Updated situation for this session

token_budget?

number

Threshold value for the adaptive context functionality

Defined in

src/api/models/UpdateSessionRequest.ts:8


UpdateToolRequest

Ζ¬ UpdateToolRequest: Object

Type declaration

NameTypeDescription

function

Function definition and parameters

Defined in

src/api/models/UpdateToolRequest.ts:6


UpdateUserRequest

Ζ¬ UpdateUserRequest: Object

A valid request payload for updating a user

Type declaration

NameTypeDescription

about

string

About the user

metadata?

any

Optional metadata

name

string

Name of the user

Defined in

src/api/models/UpdateUserRequest.ts:8


User

Ζ¬ User: Object

Type declaration

NameTypeDescription

about?

string

About the user

created_at?

string

User created at (RFC-3339 format)

id

string

User id (UUID)

metadata?

any

(Optional) metadata

name?

string

Name of the user

updated_at?

string

User updated at (RFC-3339 format)

Defined in

src/api/models/User.ts:5


agent_id

Ζ¬ agent_id: string

Defined in

src/api/models/agent_id.ts:5


doc_id

Ζ¬ doc_id: string

Defined in

src/api/models/doc_id.ts:5


job_id

Ζ¬ job_id: string

Defined in

src/api/models/job_id.ts:5


memory_id

Ζ¬ memory_id: string

Defined in

src/api/models/memory_id.ts:5


message_id

Ζ¬ message_id: string

Defined in

src/api/models/message_id.ts:5


session_id

Ζ¬ session_id: string

Defined in

src/api/models/session_id.ts:5


tool_id

Ζ¬ tool_id: string

Defined in

src/api/models/tool_id.ts:5


user_id

Ζ¬ user_id: string

Defined in

src/api/models/user_id.ts:5

Variables

$Agent

β€’ Const $Agent: Object

Type declaration

NameType

properties

{ about: { description: "About the agent" ; type: "string" = "string" } ; created_at: { description: "Agent created at (RFC-3339 format)" ; format: "date-time" = "date-time"; type: "string" = "string" } ; default_settings: { description: "Default settings for all sessions created by this agent" ; type: "AgentDefaultSettings" = "AgentDefaultSettings" } ; id: { description: "Agent id (UUID)" ; format: "uuid" = "uuid"; isRequired: true = true; type: "string" = "string" } ; instructions: { contains: readonly [{ type: "string" = "string" }, { contains: { type: "string" = "string" } ; type: "array" = "array" }] ; description: "Instructions for the agent" ; type: "one-of" = "one-of" } ; metadata: { description: "Optional metadata" ; properties: {} = {} } ; model: { description: "The model to use with this agent" ; isRequired: true = true; type: "string" = "string" } ; name: { description: "Name of the agent" ; isRequired: true = true; type: "string" = "string" } ; updated_at: { description: "Agent updated at (RFC-3339 format)" ; format: "date-time" = "date-time"; type: "string" = "string" } }

properties.about

{ description: "About the agent" ; type: "string" = "string" }

properties.about.description

"About the agent"

properties.about.type

"string"

properties.created_at

{ description: "Agent created at (RFC-3339 format)" ; format: "date-time" = "date-time"; type: "string" = "string" }

properties.created_at.description

"Agent created at (RFC-3339 format)"

properties.created_at.format

"date-time"

properties.created_at.type

"string"

properties.default_settings

{ description: "Default settings for all sessions created by this agent" ; type: "AgentDefaultSettings" = "AgentDefaultSettings" }

properties.default_settings.description

"Default settings for all sessions created by this agent"

properties.default_settings.type

"AgentDefaultSettings"

properties.id

{ description: "Agent id (UUID)" ; format: "uuid" = "uuid"; isRequired: true = true; type: "string" = "string" }

properties.id.description

"Agent id (UUID)"

properties.id.format

"uuid"

properties.id.isRequired

true

properties.id.type

"string"

properties.instructions

{ contains: readonly [{ type: "string" = "string" }, { contains: { type: "string" = "string" } ; type: "array" = "array" }] ; description: "Instructions for the agent" ; type: "one-of" = "one-of" }

properties.instructions.contains

readonly [{ type: "string" = "string" }, { contains: { type: "string" = "string" } ; type: "array" = "array" }]

properties.instructions.description

"Instructions for the agent"

properties.instructions.type

"one-of"

properties.metadata

{ description: "Optional metadata" ; properties: {} = {} }

properties.metadata.description

"Optional metadata"

properties.metadata.properties

{}

properties.model

{ description: "The model to use with this agent" ; isRequired: true = true; type: "string" = "string" }

properties.model.description

"The model to use with this agent"

properties.model.isRequired

true

properties.model.type

"string"

properties.name

{ description: "Name of the agent" ; isRequired: true = true; type: "string" = "string" }

properties.name.description

"Name of the agent"

properties.name.isRequired

true

properties.name.type

"string"

properties.updated_at

{ description: "Agent updated at (RFC-3339 format)" ; format: "date-time" = "date-time"; type: "string" = "string" }

properties.updated_at.description

"Agent updated at (RFC-3339 format)"

properties.updated_at.format

"date-time"

properties.updated_at.type

"string"

Defined in

src/api/schemas/$Agent.ts:5


$AgentDefaultSettings

β€’ Const $AgentDefaultSettings: Object

Type declaration

NameType

properties

{ frequency_penalty: { description: "(OpenAI-like) Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim." ; isNullable: true = true; maximum: 2 = 2; minimum: -2 = -2; type: "number" = "number" } ; length_penalty: { description: "(Huggingface-like) Number between 0 and 2.0. 1.0 is neutral and values larger than that penalize number of tokens generated. " ; isNullable: true = true; maximum: 2 = 2; type: "number" = "number" } ; min_p: { description: "Minimum probability compared to leading token to be considered" ; exclusiveMaximum: true = true; maximum: 1 = 1; type: "number" = "number" } ; presence_penalty: { description: "(OpenAI-like) Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim." ; isNullable: true = true; maximum: 1 = 1; minimum: -1 = -1; type: "number" = "number" } ; preset: { type: "Enum" = "Enum" } ; repetition_penalty: { description: "(Huggingface-like) Number between 0 and 2.0. 1.0 is neutral and values larger than that penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim." ; isNullable: true = true; maximum: 2 = 2; type: "number" = "number" } ; temperature: { description: "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic." ; isNullable: true = true; maximum: 3 = 3; type: "number" = "number" } ; top_p: { description: "Defaults to 1 An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or temperature but not both." ; isNullable: true = true; maximum: 1 = 1; type: "number" = "number" } }

properties.frequency_penalty

{ description: "(OpenAI-like) Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim." ; isNullable: true = true; maximum: 2 = 2; minimum: -2 = -2; type: "number" = "number" }

properties.frequency_penalty.description

"(OpenAI-like) Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim."

properties.frequency_penalty.isNullable

true

properties.frequency_penalty.maximum

2

properties.frequency_penalty.minimum

-2

properties.frequency_penalty.type

"number"

properties.length_penalty

{ description: "(Huggingface-like) Number between 0 and 2.0. 1.0 is neutral and values larger than that penalize number of tokens generated. " ; isNullable: true = true; maximum: 2 = 2; type: "number" = "number" }

properties.length_penalty.description

"(Huggingface-like) Number between 0 and 2.0. 1.0 is neutral and values larger than that penalize number of tokens generated. "

properties.length_penalty.isNullable

true

properties.length_penalty.maximum

2

properties.length_penalty.type

"number"

properties.min_p

{ description: "Minimum probability compared to leading token to be considered" ; exclusiveMaximum: true = true; maximum: 1 = 1; type: "number" = "number" }

properties.min_p.description

"Minimum probability compared to leading token to be considered"

properties.min_p.exclusiveMaximum

true

properties.min_p.maximum

1

properties.min_p.type

"number"

properties.presence_penalty

{ description: "(OpenAI-like) Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim." ; isNullable: true = true; maximum: 1 = 1; minimum: -1 = -1; type: "number" = "number" }

properties.presence_penalty.description

"(OpenAI-like) Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim."

properties.presence_penalty.isNullable

true

properties.presence_penalty.maximum

1

properties.presence_penalty.minimum

-1

properties.presence_penalty.type

"number"

properties.preset

{ type: "Enum" = "Enum" }

properties.preset.type

"Enum"

properties.repetition_penalty

{ description: "(Huggingface-like) Number between 0 and 2.0. 1.0 is neutral and values larger than that penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim." ; isNullable: true = true; maximum: 2 = 2; type: "number" = "number" }

properties.repetition_penalty.description

"(Huggingface-like) Number between 0 and 2.0. 1.0 is neutral and values larger than that penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim."

properties.repetition_penalty.isNullable

true

properties.repetition_penalty.maximum

2

properties.repetition_penalty.type

"number"

properties.temperature

{ description: "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic." ; isNullable: true = true; maximum: 3 = 3; type: "number" = "number" }

properties.temperature.description

"What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic."

properties.temperature.isNullable

true

properties.temperature.maximum

3

properties.temperature.type

"number"

properties.top_p

{ description: "Defaults to 1 An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or temperature but not both." ; isNullable: true = true; maximum: 1 = 1; type: "number" = "number" }

properties.top_p.description

"Defaults to 1 An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or temperature but not both."

properties.top_p.isNullable

true

properties.top_p.maximum

1

properties.top_p.type

"number"

Defined in

src/api/schemas/$AgentDefaultSettings.ts:5


$ChatInput

β€’ Const $ChatInput: Object

Type declaration

NameType

contains

readonly [{ type: "ChatInputData" = "ChatInputData" }, { type: "ChatSettings" = "ChatSettings" }, { type: "MemoryAccessOptions" = "MemoryAccessOptions" }]

type

"all-of"

Defined in

src/api/schemas/$ChatInput.ts:5


$ChatInputData

β€’ Const $ChatInputData: Object

Type declaration

NameType

properties

{ messages: { contains: { type: "InputChatMLMessage" = "InputChatMLMessage" } ; isRequired: true = true; type: "array" = "array" } ; tool_choice: { contains: readonly [{ type: "ToolChoiceOption" = "ToolChoiceOption" }, { type: "NamedToolChoice" = "NamedToolChoice" }] ; description: "Can be one of existing tools given to the agent earlier or the ones included in the request" ; isNullable: true = true; type: "one-of" = "one-of" } ; tools: { contains: { type: "Tool" = "Tool" } ; isNullable: true = true; type: "array" = "array" } }

properties.messages

{ contains: { type: "InputChatMLMessage" = "InputChatMLMessage" } ; isRequired: true = true; type: "array" = "array" }

properties.messages.contains

{ type: "InputChatMLMessage" = "InputChatMLMessage" }

properties.messages.contains.type

"InputChatMLMessage"

properties.messages.isRequired

true

properties.messages.type

"array"

properties.tool_choice

{ contains: readonly [{ type: "ToolChoiceOption" = "ToolChoiceOption" }, { type: "NamedToolChoice" = "NamedToolChoice" }] ; description: "Can be one of existing tools given to the agent earlier or the ones included in the request" ; isNullable: true = true; type: "one-of" = "one-of" }

properties.tool_choice.contains

readonly [{ type: "ToolChoiceOption" = "ToolChoiceOption" }, { type: "NamedToolChoice" = "NamedToolChoice" }]

properties.tool_choice.description

"Can be one of existing tools given to the agent earlier or the ones included in the request"

properties.tool_choice.isNullable

true

properties.tool_choice.type

"one-of"

properties.tools

{ contains: { type: "Tool" = "Tool" } ; isNullable: true = true; type: "array" = "array" }

properties.tools.contains

{ type: "Tool" = "Tool" }

properties.tools.contains.type

"Tool"

properties.tools.isNullable

true

properties.tools.type

"array"

Defined in

src/api/schemas/$ChatInputData.ts:5


$ChatMLImageContentPart

β€’ Const $ChatMLImageContentPart: Object

Type declaration

NameType

properties

{ image_url: { description: "Image content part, can be a URL or a base64-encoded image" ; isRequired: true = true; properties: { detail: { type: "Enum" = "Enum" } ; url: { description: "URL or base64 data url (e.g. `data:image/jpeg;base64,<the base64 encoded image>`)" ; isRequired: true = true; type: "string" = "string" } } } ; type: { isRequired: true = true; type: "Enum" = "Enum" } }

properties.image_url

{ description: "Image content part, can be a URL or a base64-encoded image" ; isRequired: true = true; properties: { detail: { type: "Enum" = "Enum" } ; url: { description: "URL or base64 data url (e.g. `data:image/jpeg;base64,<the base64 encoded image>`)" ; isRequired: true = true; type: "string" = "string" } } }

properties.image_url.description

"Image content part, can be a URL or a base64-encoded image"

properties.image_url.isRequired

true

properties.image_url.properties

{ detail: { type: "Enum" = "Enum" } ; url: { description: "URL or base64 data url (e.g. `data:image/jpeg;base64,<the base64 encoded image>`)" ; isRequired: true = true; type: "string" = "string" } }

properties.image_url.properties.detail

{ type: "Enum" = "Enum" }

properties.image_url.properties.detail.type

"Enum"

properties.image_url.properties.url

{ description: "URL or base64 data url (e.g. `data:image/jpeg;base64,<the base64 encoded image>`)" ; isRequired: true = true; type: "string" = "string" }

properties.image_url.properties.url.description

"URL or base64 data url (e.g. `data:image/jpeg;base64,<the base64 encoded image>`)"

properties.image_url.properties.url.isRequired

true

properties.image_url.properties.url.type

"string"

properties.type

{ isRequired: true = true; type: "Enum" = "Enum" }

properties.type.isRequired

true

properties.type.type

"Enum"

Defined in

src/api/schemas/$ChatMLImageContentPart.ts:5


$ChatMLMessage

β€’ Const $ChatMLMessage: Object

Type declaration

NameType

properties

{ content: { contains: readonly [{ type: "string" = "string" }] ; description: "ChatML content" ; isRequired: true = true; type: "one-of" = "one-of" } ; created_at: { description: "Message created at (RFC-3339 format)" ; format: "date-time" = "date-time"; isRequired: true = true; type: "string" = "string" } ; id: { description: "Message ID" ; format: "uuid" = "uuid"; isRequired: true = true; type: "string" = "string" } ; name: { description: "ChatML name" ; type: "string" = "string" } ; role: { isRequired: true = true; type: "Enum" = "Enum" } }

properties.content

{ contains: readonly [{ type: "string" = "string" }] ; description: "ChatML content" ; isRequired: true = true; type: "one-of" = "one-of" }

properties.content.contains

readonly [{ type: "string" = "string" }]

properties.content.description

"ChatML content"

properties.content.isRequired

true

properties.content.type

"one-of"

properties.created_at

{ description: "Message created at (RFC-3339 format)" ; format: "date-time" = "date-time"; isRequired: true = true; type: "string" = "string" }

properties.created_at.description

"Message created at (RFC-3339 format)"

properties.created_at.format

"date-time"

properties.created_at.isRequired

true

properties.created_at.type

"string"

properties.id

{ description: "Message ID" ; format: "uuid" = "uuid"; isRequired: true = true; type: "string" = "string" }

properties.id.description

"Message ID"

properties.id.format

"uuid"

properties.id.isRequired

true

properties.id.type

"string"

properties.name

{ description: "ChatML name" ; type: "string" = "string" }

properties.name.description

"ChatML name"

properties.name.type

"string"

properties.role

{ isRequired: true = true; type: "Enum" = "Enum" }

properties.role.isRequired

true

properties.role.type

"Enum"

Defined in

src/api/schemas/$ChatMLMessage.ts:5


$ChatMLTextContentPart

β€’ Const $ChatMLTextContentPart: Object

Type declaration

NameType

properties

{ text: { description: "Text content part" ; isRequired: true = true; type: "string" = "string" } ; type: { isRequired: true = true; type: "Enum" = "Enum" } }

properties.text

{ description: "Text content part" ; isRequired: true = true; type: "string" = "string" }

properties.text.description

"Text content part"

properties.text.isRequired

true

properties.text.type

"string"

properties.type

{ isRequired: true = true; type: "Enum" = "Enum" }

properties.type.isRequired

true

properties.type.type

"Enum"

Defined in

src/api/schemas/$ChatMLTextContentPart.ts:5


$ChatResponse

β€’ Const $ChatResponse: Object

Type declaration

NameType

description

"Represents a chat completion response returned by model, based on the provided input."

properties

{ doc_ids: { isRequired: true = true; type: "DocIds" = "DocIds" } ; finish_reason: { isRequired: true = true; type: "Enum" = "Enum" } ; id: { description: "A unique identifier for the chat completion." ; format: "uuid" = "uuid"; isRequired: true = true; type: "string" = "string" } ; jobs: { contains: { format: "uuid" = "uuid"; type: "string" = "string" } ; type: "array" = "array" } ; response: { contains: { contains: { type: "ChatMLMessage" = "ChatMLMessage" } ; type: "array" = "array" } ; isRequired: true = true; type: "array" = "array" } ; usage: { isRequired: true = true; type: "CompletionUsage" = "CompletionUsage" } }

properties.doc_ids

{ isRequired: true = true; type: "DocIds" = "DocIds" }

properties.doc_ids.isRequired

true

properties.doc_ids.type

"DocIds"

properties.finish_reason

{ isRequired: true = true; type: "Enum" = "Enum" }

properties.finish_reason.isRequired

true

properties.finish_reason.type

"Enum"

properties.id

{ description: "A unique identifier for the chat completion." ; format: "uuid" = "uuid"; isRequired: true = true; type: "string" = "string" }

properties.id.description

"A unique identifier for the chat completion."

properties.id.format

"uuid"

properties.id.isRequired

true

properties.id.type

"string"

properties.jobs

{ contains: { format: "uuid" = "uuid"; type: "string" = "string" } ; type: "array" = "array" }

properties.jobs.contains

{ format: "uuid" = "uuid"; type: "string" = "string" }

properties.jobs.contains.format

"uuid"

properties.jobs.contains.type

"string"

properties.jobs.type

"array"

properties.response

{ contains: { contains: { type: "ChatMLMessage" = "ChatMLMessage" } ; type: "array" = "array" } ; isRequired: true = true; type: "array" = "array" }

properties.response.contains

{ contains: { type: "ChatMLMessage" = "ChatMLMessage" } ; type: "array" = "array" }

properties.response.contains.contains

{ type: "ChatMLMessage" = "ChatMLMessage" }

properties.response.contains.contains.type

"ChatMLMessage"

properties.response.contains.type

"array"

properties.response.isRequired

true

properties.response.type

"array"

properties.usage

{ isRequired: true = true; type: "CompletionUsage" = "CompletionUsage" }

properties.usage.isRequired

true

properties.usage.type

"CompletionUsage"

Defined in

src/api/schemas/$ChatResponse.ts:5


$ChatSettings

β€’ Const $ChatSettings: Object

Type declaration

NameType

properties

{ frequency_penalty: { description: "(OpenAI-like) Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim." ; isNullable: true = true; maximum: 1 = 1; minimum: -1 = -1; type: "number" = "number" } ; length_penalty: { description: "(Huggingface-like) Number between 0 and 2.0. 1.0 is neutral and values larger than that penalize number of tokens generated. " ; isNullable: true = true; maximum: 2 = 2; type: "number" = "number" } ; logit_bias: { contains: { type: "number" = "number" } ; isNullable: true = true; type: "dictionary" = "dictionary" } ; max_tokens: { description: "The maximum number of tokens to generate in the chat completion.\n The total length of input tokens and generated tokens is limited by the model's context length.\n " ; isNullable: true = true; maximum: 16384 = 16384; minimum: 1 = 1; type: "number" = "number" } ; min_p: { description: "Minimum probability compared to leading token to be considered" ; exclusiveMaximum: true = true; maximum: 1 = 1; type: "number" = "number" } ; presence_penalty: { description: "(OpenAI-like) Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim." ; isNullable: true = true; maximum: 1 = 1; minimum: -1 = -1; type: "number" = "number" } ; preset: { type: "Enum" = "Enum" } ; repetition_penalty: { description: "(Huggingface-like) Number between 0 and 2.0. 1.0 is neutral and values larger than that penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim." ; isNullable: true = true; maximum: 2 = 2; type: "number" = "number" } ; response_format: { description: "An object specifying the format that the model must output.\n Setting to `{ \"type\": \"json_object\" }` enables JSON mode, which guarantees the message the model generates is valid JSON.\n **Important:** when using JSON mode, you **must** also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly \"stuck\" request. Also note that the message content may be partially cut off if `finish_reason=\"length\"`, which indicates the generation exceeded `max_tokens` or the conversation exceeded the max context length.\n " ; properties: { pattern: { description: "Regular expression pattern to use if `type` is `\"regex\"`" ; type: "string" = "string" } ; schema: { description: "JSON Schema to use if `type` is `\"json_object\"`" ; properties: {} = {} } ; type: { type: "Enum" = "Enum" } } } ; seed: { description: "This feature is in Beta.\n If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same `seed` and parameters should return the same result.\n Determinism is not guaranteed, and you should refer to the `system_fingerprint` response parameter to monitor changes in the backend.\n " ; isNullable: true = true; maximum: 9999 = 9999; minimum: -1 = -1; type: "number" = "number" } ; stop: { contains: readonly [{ isNullable: true = true; type: