diff --git a/src/api/resources/graph/client/requests/AddDataRequest.ts b/src/api/resources/graph/client/requests/AddDataRequest.ts index ce4b2ca..de8cc0a 100644 --- a/src/api/resources/graph/client/requests/AddDataRequest.ts +++ b/src/api/resources/graph/client/requests/AddDataRequest.ts @@ -11,6 +11,6 @@ import * as Zep from "../../../../index"; export interface AddDataRequest { data?: string; groupId?: string; - type?: Zep.ModelsGraphDataType; + type?: Zep.GraphDataType; userId?: string; } diff --git a/src/api/resources/memory/client/Client.ts b/src/api/resources/memory/client/Client.ts index b1af70f..b06d64d 100644 --- a/src/api/resources/memory/client/Client.ts +++ b/src/api/resources/memory/client/Client.ts @@ -1405,19 +1405,22 @@ export class Memory { * Add memory to the specified session. * * @param {string} sessionId - The ID of the session to which memory should be added. - * @param {Zep.ApidataAddMemoryRequest} request + * @param {Zep.AddMemoryRequest} request * @param {Memory.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Zep.InternalServerError} * * @example * await zep.memory.add("sessionId", { - * messages: [{}] + * messages: [{ + * content: "content", + * roleType: Zep.RoleType.NoRole + * }] * }) */ public async add( sessionId: string, - request: Zep.ApidataAddMemoryRequest, + request: Zep.AddMemoryRequest, requestOptions?: Memory.RequestOptions ): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -1435,7 +1438,7 @@ export class Memory { ...(await this._getCustomAuthorizationHeaders()), }, contentType: "application/json", - body: await serializers.ApidataAddMemoryRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + body: await serializers.AddMemoryRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, abortSignal: requestOptions?.abortSignal, diff --git a/src/api/resources/memory/client/requests/ApidataAddMemoryRequest.ts b/src/api/resources/memory/client/requests/AddMemoryRequest.ts similarity index 77% rename from src/api/resources/memory/client/requests/ApidataAddMemoryRequest.ts rename to src/api/resources/memory/client/requests/AddMemoryRequest.ts index 4c896ae..28ccc0e 100644 --- a/src/api/resources/memory/client/requests/ApidataAddMemoryRequest.ts +++ b/src/api/resources/memory/client/requests/AddMemoryRequest.ts @@ -7,10 +7,13 @@ import * as Zep from "../../../../index"; /** * @example * { - * messages: [{}] + * messages: [{ + * content: "content", + * roleType: Zep.RoleType.NoRole + * }] * } */ -export interface ApidataAddMemoryRequest { +export interface AddMemoryRequest { /** Additional instruction for generating the facts. Zep Cloud Only, will be ignored on Community Edition. */ factInstruction?: string; /** A list of message objects, where each message contains a role and content. */ diff --git a/src/api/resources/memory/client/requests/index.ts b/src/api/resources/memory/client/requests/index.ts index c1e45fa..f52ac61 100644 --- a/src/api/resources/memory/client/requests/index.ts +++ b/src/api/resources/memory/client/requests/index.ts @@ -8,7 +8,7 @@ export { type ExtractDataRequest } from "./ExtractDataRequest"; export { type MemoryGetSessionFactsRequest } from "./MemoryGetSessionFactsRequest"; export { type AddFactsRequest } from "./AddFactsRequest"; export { type MemoryGetRequest } from "./MemoryGetRequest"; -export { type ApidataAddMemoryRequest } from "./ApidataAddMemoryRequest"; +export { type AddMemoryRequest } from "./AddMemoryRequest"; export { type MemoryGetSessionMessagesRequest } from "./MemoryGetSessionMessagesRequest"; export { type ModelsMessageMetadataUpdate } from "./ModelsMessageMetadataUpdate"; export { type MemorySearchPayload } from "./MemorySearchPayload"; diff --git a/src/api/types/Fact.ts b/src/api/types/Fact.ts index 2333d0e..ff2ed63 100644 --- a/src/api/types/Fact.ts +++ b/src/api/types/Fact.ts @@ -4,10 +4,13 @@ export interface Fact { createdAt?: string; + expiredAt?: string; fact?: string; + invalidAt?: string; name?: string; rating?: number; sourceNodeName?: string; targetNodeName?: string; uuid?: string; + validAt?: string; } diff --git a/src/api/types/ModelsGraphDataType.ts b/src/api/types/GraphDataType.ts similarity index 59% rename from src/api/types/ModelsGraphDataType.ts rename to src/api/types/GraphDataType.ts index a7ca3ad..68c0e40 100644 --- a/src/api/types/ModelsGraphDataType.ts +++ b/src/api/types/GraphDataType.ts @@ -2,9 +2,9 @@ * This file was auto-generated by Fern from our API Definition. */ -export type ModelsGraphDataType = "text" | "json" | "message"; +export type GraphDataType = "text" | "json" | "message"; -export const ModelsGraphDataType = { +export const GraphDataType = { Text: "text", Json: "json", Message: "message", diff --git a/src/api/types/Message.ts b/src/api/types/Message.ts index 7c045c7..f5068f7 100644 --- a/src/api/types/Message.ts +++ b/src/api/types/Message.ts @@ -6,7 +6,7 @@ import * as Zep from "../index"; export interface Message { /** The content of the message. */ - content?: string; + content: string; /** The timestamp of when the message was created. */ createdAt?: string; /** The metadata associated with the message. */ @@ -14,7 +14,7 @@ export interface Message { /** The role of the sender of the message (e.g., "user", "assistant"). */ role?: string; /** The type of the role (e.g., "user", "system"). */ - roleType?: Zep.RoleType; + roleType: Zep.RoleType; /** The number of tokens in the message. */ tokenCount?: number; /** The timestamp of when the message was last updated. */ diff --git a/src/api/types/index.ts b/src/api/types/index.ts index a78f02d..d8be894 100644 --- a/src/api/types/index.ts +++ b/src/api/types/index.ts @@ -40,7 +40,7 @@ export * from "./ClassifySessionRequest"; export * from "./CreateDocumentRequest"; export * from "./FactRatingExamples"; export * from "./FactRatingInstruction"; -export * from "./ModelsGraphDataType"; +export * from "./GraphDataType"; export * from "./SearchScope"; export * from "./SearchType"; export * from "./UpdateDocumentListRequest"; diff --git a/src/serialization/resources/graph/client/requests/AddDataRequest.ts b/src/serialization/resources/graph/client/requests/AddDataRequest.ts index f3843a7..5a2c16f 100644 --- a/src/serialization/resources/graph/client/requests/AddDataRequest.ts +++ b/src/serialization/resources/graph/client/requests/AddDataRequest.ts @@ -5,13 +5,13 @@ import * as serializers from "../../../../index"; import * as Zep from "../../../../../api/index"; import * as core from "../../../../../core"; -import { ModelsGraphDataType } from "../../../../types/ModelsGraphDataType"; +import { GraphDataType } from "../../../../types/GraphDataType"; export const AddDataRequest: core.serialization.Schema = core.serialization.object({ data: core.serialization.string().optional(), groupId: core.serialization.property("group_id", core.serialization.string().optional()), - type: ModelsGraphDataType.optional(), + type: GraphDataType.optional(), userId: core.serialization.property("user_id", core.serialization.string().optional()), }); @@ -19,7 +19,7 @@ export declare namespace AddDataRequest { interface Raw { data?: string | null; group_id?: string | null; - type?: ModelsGraphDataType.Raw | null; + type?: GraphDataType.Raw | null; user_id?: string | null; } } diff --git a/src/serialization/resources/memory/client/requests/AddMemoryRequest.ts b/src/serialization/resources/memory/client/requests/AddMemoryRequest.ts new file mode 100644 index 0000000..794dc12 --- /dev/null +++ b/src/serialization/resources/memory/client/requests/AddMemoryRequest.ts @@ -0,0 +1,23 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../index"; +import * as Zep from "../../../../../api/index"; +import * as core from "../../../../../core"; +import { Message } from "../../../../types/Message"; + +export const AddMemoryRequest: core.serialization.Schema = + core.serialization.object({ + factInstruction: core.serialization.property("fact_instruction", core.serialization.string().optional()), + messages: core.serialization.list(Message), + summaryInstruction: core.serialization.property("summary_instruction", core.serialization.string().optional()), + }); + +export declare namespace AddMemoryRequest { + interface Raw { + fact_instruction?: string | null; + messages: Message.Raw[]; + summary_instruction?: string | null; + } +} diff --git a/src/serialization/resources/memory/client/requests/ApidataAddMemoryRequest.ts b/src/serialization/resources/memory/client/requests/ApidataAddMemoryRequest.ts deleted file mode 100644 index 6740312..0000000 --- a/src/serialization/resources/memory/client/requests/ApidataAddMemoryRequest.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../../../../index"; -import * as Zep from "../../../../../api/index"; -import * as core from "../../../../../core"; -import { Message } from "../../../../types/Message"; - -export const ApidataAddMemoryRequest: core.serialization.Schema< - serializers.ApidataAddMemoryRequest.Raw, - Zep.ApidataAddMemoryRequest -> = core.serialization.object({ - factInstruction: core.serialization.property("fact_instruction", core.serialization.string().optional()), - messages: core.serialization.list(Message), - summaryInstruction: core.serialization.property("summary_instruction", core.serialization.string().optional()), -}); - -export declare namespace ApidataAddMemoryRequest { - interface Raw { - fact_instruction?: string | null; - messages: Message.Raw[]; - summary_instruction?: string | null; - } -} diff --git a/src/serialization/resources/memory/client/requests/index.ts b/src/serialization/resources/memory/client/requests/index.ts index 9618aec..004608b 100644 --- a/src/serialization/resources/memory/client/requests/index.ts +++ b/src/serialization/resources/memory/client/requests/index.ts @@ -5,6 +5,6 @@ export { UpdateSessionRequest } from "./UpdateSessionRequest"; export { EndSessionRequest } from "./EndSessionRequest"; export { ExtractDataRequest } from "./ExtractDataRequest"; export { AddFactsRequest } from "./AddFactsRequest"; -export { ApidataAddMemoryRequest } from "./ApidataAddMemoryRequest"; +export { AddMemoryRequest } from "./AddMemoryRequest"; export { ModelsMessageMetadataUpdate } from "./ModelsMessageMetadataUpdate"; export { MemorySearchPayload } from "./MemorySearchPayload"; diff --git a/src/serialization/types/Fact.ts b/src/serialization/types/Fact.ts index a4f69e8..7b2e5c0 100644 --- a/src/serialization/types/Fact.ts +++ b/src/serialization/types/Fact.ts @@ -8,22 +8,28 @@ import * as core from "../../core"; export const Fact: core.serialization.ObjectSchema = core.serialization.object({ createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + expiredAt: core.serialization.property("expired_at", core.serialization.string().optional()), fact: core.serialization.string().optional(), + invalidAt: core.serialization.property("invalid_at", core.serialization.string().optional()), name: core.serialization.string().optional(), rating: core.serialization.number().optional(), sourceNodeName: core.serialization.property("source_node_name", core.serialization.string().optional()), targetNodeName: core.serialization.property("target_node_name", core.serialization.string().optional()), uuid: core.serialization.string().optional(), + validAt: core.serialization.property("valid_at", core.serialization.string().optional()), }); export declare namespace Fact { interface Raw { created_at?: string | null; + expired_at?: string | null; fact?: string | null; + invalid_at?: string | null; name?: string | null; rating?: number | null; source_node_name?: string | null; target_node_name?: string | null; uuid?: string | null; + valid_at?: string | null; } } diff --git a/src/serialization/types/ModelsGraphDataType.ts b/src/serialization/types/GraphDataType.ts similarity index 50% rename from src/serialization/types/ModelsGraphDataType.ts rename to src/serialization/types/GraphDataType.ts index 495907d..8ae1a46 100644 --- a/src/serialization/types/ModelsGraphDataType.ts +++ b/src/serialization/types/GraphDataType.ts @@ -6,11 +6,9 @@ import * as serializers from "../index"; import * as Zep from "../../api/index"; import * as core from "../../core"; -export const ModelsGraphDataType: core.serialization.Schema< - serializers.ModelsGraphDataType.Raw, - Zep.ModelsGraphDataType -> = core.serialization.enum_(["text", "json", "message"]); +export const GraphDataType: core.serialization.Schema = + core.serialization.enum_(["text", "json", "message"]); -export declare namespace ModelsGraphDataType { +export declare namespace GraphDataType { type Raw = "text" | "json" | "message"; } diff --git a/src/serialization/types/Message.ts b/src/serialization/types/Message.ts index dbb8bce..9c3eca6 100644 --- a/src/serialization/types/Message.ts +++ b/src/serialization/types/Message.ts @@ -9,11 +9,11 @@ import { RoleType } from "./RoleType"; export const Message: core.serialization.ObjectSchema = core.serialization.object( { - content: core.serialization.string().optional(), + content: core.serialization.string(), createdAt: core.serialization.property("created_at", core.serialization.string().optional()), metadata: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), role: core.serialization.string().optional(), - roleType: core.serialization.property("role_type", RoleType.optional()), + roleType: core.serialization.property("role_type", RoleType), tokenCount: core.serialization.property("token_count", core.serialization.number().optional()), updatedAt: core.serialization.property("updated_at", core.serialization.string().optional()), uuid: core.serialization.string().optional(), @@ -22,11 +22,11 @@ export const Message: core.serialization.ObjectSchema | null; role?: string | null; - role_type?: RoleType.Raw | null; + role_type: RoleType.Raw; token_count?: number | null; updated_at?: string | null; uuid?: string | null; diff --git a/src/serialization/types/index.ts b/src/serialization/types/index.ts index a78f02d..d8be894 100644 --- a/src/serialization/types/index.ts +++ b/src/serialization/types/index.ts @@ -40,7 +40,7 @@ export * from "./ClassifySessionRequest"; export * from "./CreateDocumentRequest"; export * from "./FactRatingExamples"; export * from "./FactRatingInstruction"; -export * from "./ModelsGraphDataType"; +export * from "./GraphDataType"; export * from "./SearchScope"; export * from "./SearchType"; export * from "./UpdateDocumentListRequest";