@arizeai/phoenix-client
Version:
A client for the Phoenix API
54 lines • 1.6 kB
TypeScript
import type { ClientFn } from "../types/core";
/**
* Parameters for a single session note.
*/
export interface SessionNote {
/**
* The session ID used to track a conversation, thread, or session.
*/
sessionId: string;
/**
* The note text to add to the session.
*/
note: string;
/**
* Optional caller-supplied identifier. When non-empty, the note is upserted
* on `(sessionId, name='note', identifier)` — repeated calls with the same
* identifier overwrite the existing note. When omitted, the server stamps a
* unique `px-session-note:<uuid>` identifier so each call appends a new note.
*/
identifier?: string;
}
/**
* Parameters to add a session note.
*/
export interface AddSessionNoteParams extends ClientFn {
sessionNote: SessionNote;
}
/**
* Add a note to a session.
*
* When `sessionNote.identifier` is omitted, each call appends a new note with
* an auto-generated identifier. When `identifier` is non-empty, repeated calls
* with the same `(sessionId, name='note', identifier)` overwrite the existing
* note.
*
* @param params - The parameters to add a session note.
* @returns The ID of the created note annotation.
*
* @requires Phoenix server >= 14.17.0
*
* @example
* ```ts
* const result = await addSessionNote({
* sessionNote: {
* sessionId: "my-session",
* note: "Needs review"
* }
* });
* ```
*/
export declare function addSessionNote({ client: _client, sessionNote, }: AddSessionNoteParams): Promise<{
id: string;
}>;
//# sourceMappingURL=addSessionNote.d.ts.map