Functions
update-chat-completion
fn (completion-id: Str, request: UpdateChatCompletionRequest): UpdateChatCompletionResponse
fn (completion-id: Str, request: UpdateChatCompletionRequest, opts: Map): UpdateChatCompletionResponse
POST /chat/completions/{completion_id} - Update metadata on a stored chat completion.
Example
completion ::openai::update/update-chat-completion("chatcmpl_abc123", ::openai::update/UpdateChatCompletionRequest({
metadata: {ticket: "T-42"}
}))
completion.id
update-eval
fn (eval-id: Str, request: UpdateEvalRequest): UpdateEvalResponse
fn (eval-id: Str, request: UpdateEvalRequest, opts: Map): UpdateEvalResponse
POST /evals/{eval_id} - Update the name or metadata of an evaluation.
Example
evaluation ::openai::update/update-eval("eval_abc123", ::openai::update/UpdateEvalRequest({
name: "Greeting check v2"
}))
evaluation.name
update-vector-store-file-attributes
fn (vector-store-id: Str, file-id: Str, request: UpdateVectorStoreFileAttributesRequest): UpdateVectorStoreFileAttributesResponse
fn (vector-store-id: Str, file-id: Str, request: UpdateVectorStoreFileAttributesRequest, opts: Map): UpdateVectorStoreFileAttributesResponse
POST /vector_stores/{vector_store_id}/files/{file_id} - Update vector store file attributes
Example
store-file ::openai::update/update-vector-store-file-attributes("vs_abc123", "file-abc123", ::openai::update/UpdateVectorStoreFileAttributesRequest({
attributes: {author: "ada"}
}))
store-file.attributes
Types
ChunkingStrategyResponse
ChunkingStrategyResponse type {
type: Str,
static: Map?
}
CompletionUsage
CompletionUsage type {
completion_tokens: Int,
prompt_tokens: Int,
total_tokens: Int,
completion_tokens_details: Map?,
prompt_tokens_details: Map?
}
CreateChatCompletionResponse
CreateChatCompletionResponse type {
id: Str,
choices: Vec<Map>,
created: Int,
model: Str,
service_tier: ServiceTier?,
system_fingerprint: Str?,
object: "chat.completion",
usage: CompletionUsage?
}
Eval
Eval type {
object: "eval",
id: Str,
name: Str?,
data_source_config: Map,
testing_criteria: Vec,
created_at: Int,
metadata: Metadata?
}
Metadata
Metadata type Map
ServiceTier
ServiceTier type Str
UpdateChatCompletionRequest
UpdateChatCompletionRequest type {
metadata: Metadata?
}
UpdateChatCompletionResponse
UpdateChatCompletionResponse type {
id: Str,
choices: Vec<Map>,
created: Int,
model: Str,
service_tier: ServiceTier?,
system_fingerprint: Str?,
object: "chat.completion",
usage: CompletionUsage?
}
UpdateEvalRequest
UpdateEvalRequest type {
name: Str?,
metadata: Metadata?
}
UpdateEvalResponse
UpdateEvalResponse type {
object: "eval",
id: Str,
name: Str?,
data_source_config: Map,
testing_criteria: Vec,
created_at: Int,
metadata: Metadata?
}
UpdateVectorStoreFileAttributesRequest
UpdateVectorStoreFileAttributesRequest type {
attributes: VectorStoreFileAttributes?
}
UpdateVectorStoreFileAttributesRequest
UpdateVectorStoreFileAttributesRequest type {
attributes: VectorStoreFileAttributes?
}
UpdateVectorStoreFileAttributesResponse
UpdateVectorStoreFileAttributesResponse type {
id: Str,
object: "vector_store.file",
usage_bytes: Int,
created_at: Int,
vector_store_id: Str,
status: VectorStoreFileStatus,
last_error: Map?,
chunking_strategy: ChunkingStrategyResponse?,
attributes: VectorStoreFileAttributes?
}
VectorStoreFileAttributes
VectorStoreFileAttributes type Map
VectorStoreFileObject
VectorStoreFileObject type {
id: Str,
object: "vector_store.file",
usage_bytes: Int,
created_at: Int,
vector_store_id: Str,
status: VectorStoreFileStatus,
last_error: Map?,
chunking_strategy: ChunkingStrategyResponse?,
attributes: VectorStoreFileAttributes?
}
VectorStoreFileStatus
VectorStoreFileStatus type "in_progress" | "completed" | "cancelled" | "failed"