Skip to content

Commit

Permalink
SDK regeneration
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-api[bot] committed Sep 20, 2024
1 parent 472b1db commit 3431dfb
Show file tree
Hide file tree
Showing 26 changed files with 311 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/api/resources/memory/client/requests/AddMemoryRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ import * as Zep from "../../../../index";
* }
*/
export interface AddMemoryRequest {
/** Additional instruction for generating the facts. */
factInstruction?: string;
/** A list of message objects, where each message contains a role and content. */
messages: Zep.ModelsMessage[];
/** Additional instruction for generating the summary. */
summaryInstruction?: string;
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@
* This file was auto-generated by Fern from our API Definition.
*/

import * as Zep from "../../../../index";

/**
* @example
* {
* sessionId: "session_id"
* }
*/
export interface CreateSessionRequest {
/** Optional instruction to use for fact rating. */
factRatingInstruction?: Zep.FactRatingInstruction;
/** The metadata associated with the session. */
metadata?: Record<string, unknown>;
/** The unique identifier of the session. */
Expand Down
16 changes: 16 additions & 0 deletions src/api/resources/memory/client/requests/SessionSearchQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* This file was auto-generated by Fern from our API Definition.
*/

import * as Zep from "../../../../index";

/**
* @example
* {}
Expand All @@ -11,6 +13,20 @@ export interface SessionSearchQuery {
* The maximum number of search results to return. Defaults to None (no limit).
*/
limit?: number;
/** The minimum fact rating to filter on. Only supported on cloud. Will be ignored on Community Edition. */
minFactRating?: number;
/** The minimum score for search results. Only supported on cloud. Will be ignored on Community Edition. */
minScore?: number;
/** The lambda parameter for the MMR Reranking Algorithm. Only supported on cloud. Will be ignored on Community Edition. */
mmrLambda?: number;
/** Record filter on the metadata. Only supported on cloud. Will be ignored on Community Edition. */
recordFilter?: Record<string, unknown>;
/** Search scope. Only supported on cloud. On Community Edition the search scope is always "facts". */
searchScope?: Zep.SearchScope;
/** Search type. Only supported on cloud. Will be ignored on Community Edition. */
searchType?: Zep.SearchType;
/** the session ids to search */
sessionIds?: string[];
/** The search text. */
text?: string;
/** User ID used to determine which sessions to search. Required on Community Edition. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* This file was auto-generated by Fern from our API Definition.
*/

import * as Zep from "../../../../index";

/**
* @example
* {
Expand All @@ -11,6 +13,11 @@
* }
*/
export interface UpdateSessionRequest {
/**
* Optional instruction to use for fact rating.
* Fact rating instructions can not be unset.
*/
factRatingInstruction?: Zep.FactRatingInstruction;
/** The metadata to update */
metadata: Record<string, unknown>;
}
9 changes: 9 additions & 0 deletions src/api/types/FactRatingExamples.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/**
* This file was auto-generated by Fern from our API Definition.
*/

export interface FactRatingExamples {
high?: string;
low?: string;
medium?: string;
}
23 changes: 23 additions & 0 deletions src/api/types/FactRatingInstruction.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/**
* This file was auto-generated by Fern from our API Definition.
*/

import * as Zep from "../index";

export interface FactRatingInstruction {
/**
* Examples is a list of examples that demonstrate how facts might be rated based on your instruction. You should provide
* an example of a highly rated example, a low rated example, and a medium (or in between example). For example, if you are rating
* based on relevance to a trip planning application, your examples might be:
* High: "Joe's dream vacation is Bali"
* Medium: "Joe has a fear of flying",
* Low: "Joe's favorite food is Japanese",
*/
examples?: Zep.FactRatingExamples;
/**
* A string describing how to rate facts as they apply to your application. A trip planning application may
* use something like "relevancy to planning a trip, the user's preferences when traveling,
* or the user's travel history."
*/
instruction?: string;
}
11 changes: 11 additions & 0 deletions src/api/types/SearchScope.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/**
* This file was auto-generated by Fern from our API Definition.
*/

export type SearchScope = "messages" | "summary" | "facts";

export const SearchScope = {
Messages: "messages",
Summary: "summary",
Facts: "facts",
} as const;
10 changes: 10 additions & 0 deletions src/api/types/SearchType.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/**
* This file was auto-generated by Fern from our API Definition.
*/

export type SearchType = "similarity" | "mmr";

export const SearchType = {
Similarity: "similarity",
Mmr: "mmr",
} as const;
5 changes: 5 additions & 0 deletions src/api/types/Session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,15 @@
* This file was auto-generated by Fern from our API Definition.
*/

import * as Zep from "../index";

export interface Session {
classifications?: Record<string, string>;
createdAt?: string;
deletedAt?: string;
endedAt?: string;
factRatingInstruction?: Zep.SessionFactRatingInstruction;
facts?: string[];
id?: number;
metadata?: Record<string, unknown>;
projectUuid?: string;
Expand Down
9 changes: 9 additions & 0 deletions src/api/types/SessionFactRatingExamples.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/**
* This file was auto-generated by Fern from our API Definition.
*/

export interface SessionFactRatingExamples {
high?: string;
low?: string;
medium?: string;
}
23 changes: 23 additions & 0 deletions src/api/types/SessionFactRatingInstruction.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/**
* This file was auto-generated by Fern from our API Definition.
*/

import * as Zep from "../index";

export interface SessionFactRatingInstruction {
/**
* Examples is a list of examples that demonstrate how facts might be rated based on your instruction. You should provide
* an example of a highly rated example, a low rated example, and a medium (or in between example). For example, if you are rating
* based on relevance to a trip planning application, your examples might be:
* High: "Joe's dream vacation is Bali"
* Medium: "Joe has a fear of flying",
* Low: "Joe's favorite food is Japanese",
*/
examples?: Zep.SessionFactRatingExamples;
/**
* A string describing how to rate facts as they apply to your application. A trip planning application may
* use something like "relevancy to planning a trip, the user's preferences when traveling,
* or the user's travel history."
*/
instruction?: string;
}
4 changes: 4 additions & 0 deletions src/api/types/SessionSearchResult.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,8 @@ import * as Zep from "../index";

export interface SessionSearchResult {
fact?: Zep.Fact;
message?: Zep.Message;
score?: number;
sessionId?: string;
summary?: Zep.Summary;
}
6 changes: 6 additions & 0 deletions src/api/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,19 @@ export * from "./Message";
export * from "./MessageListResponse";
export * from "./RoleType";
export * from "./Session";
export * from "./SessionFactRatingExamples";
export * from "./SessionFactRatingInstruction";
export * from "./SessionListResponse";
export * from "./SessionSearchResponse";
export * from "./SessionSearchResult";
export * from "./SuccessResponse";
export * from "./Summary";
export * from "./User";
export * from "./UserListResponse";
export * from "./FactRatingExamples";
export * from "./FactRatingInstruction";
export * from "./ModelsMessage";
export * from "./ModelsRoleType";
export * from "./SearchScope";
export * from "./SearchType";
export * from "./MemoryType";
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,15 @@ import { ModelsMessage } from "../../../../types/ModelsMessage";

export const AddMemoryRequest: core.serialization.Schema<serializers.AddMemoryRequest.Raw, Zep.AddMemoryRequest> =
core.serialization.object({
factInstruction: core.serialization.property("fact_instruction", core.serialization.string().optional()),
messages: core.serialization.list(ModelsMessage),
summaryInstruction: core.serialization.property("summary_instruction", core.serialization.string().optional()),
});

export declare namespace AddMemoryRequest {
interface Raw {
fact_instruction?: string | null;
messages: ModelsMessage.Raw[];
summary_instruction?: string | null;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,21 @@
import * as serializers from "../../../../index";
import * as Zep from "../../../../../api/index";
import * as core from "../../../../../core";
import { FactRatingInstruction } from "../../../../types/FactRatingInstruction";

export const CreateSessionRequest: core.serialization.Schema<
serializers.CreateSessionRequest.Raw,
Zep.CreateSessionRequest
> = core.serialization.object({
factRatingInstruction: core.serialization.property("fact_rating_instruction", FactRatingInstruction.optional()),
metadata: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(),
sessionId: core.serialization.property("session_id", core.serialization.string()),
userId: core.serialization.property("user_id", core.serialization.string().optional()),
});

export declare namespace CreateSessionRequest {
interface Raw {
fact_rating_instruction?: FactRatingInstruction.Raw | null;
metadata?: Record<string, unknown> | null;
session_id: string;
user_id?: string | null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,39 @@
import * as serializers from "../../../../index";
import * as Zep from "../../../../../api/index";
import * as core from "../../../../../core";
import { SearchScope } from "../../../../types/SearchScope";
import { SearchType } from "../../../../types/SearchType";

export const SessionSearchQuery: core.serialization.Schema<
serializers.SessionSearchQuery.Raw,
Omit<Zep.SessionSearchQuery, "limit">
> = core.serialization.object({
minFactRating: core.serialization.property("min_fact_rating", core.serialization.number().optional()),
minScore: core.serialization.property("min_score", core.serialization.number().optional()),
mmrLambda: core.serialization.property("mmr_lambda", core.serialization.number().optional()),
recordFilter: core.serialization.property(
"record_filter",
core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional()
),
searchScope: core.serialization.property("search_scope", SearchScope.optional()),
searchType: core.serialization.property("search_type", SearchType.optional()),
sessionIds: core.serialization.property(
"session_ids",
core.serialization.list(core.serialization.string()).optional()
),
text: core.serialization.string().optional(),
userId: core.serialization.property("user_id", core.serialization.string().optional()),
});

export declare namespace SessionSearchQuery {
interface Raw {
min_fact_rating?: number | null;
min_score?: number | null;
mmr_lambda?: number | null;
record_filter?: Record<string, unknown> | null;
search_scope?: SearchScope.Raw | null;
search_type?: SearchType.Raw | null;
session_ids?: string[] | null;
text?: string | null;
user_id?: string | null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,19 @@
import * as serializers from "../../../../index";
import * as Zep from "../../../../../api/index";
import * as core from "../../../../../core";
import { FactRatingInstruction } from "../../../../types/FactRatingInstruction";

export const UpdateSessionRequest: core.serialization.Schema<
serializers.UpdateSessionRequest.Raw,
Zep.UpdateSessionRequest
> = core.serialization.object({
factRatingInstruction: core.serialization.property("fact_rating_instruction", FactRatingInstruction.optional()),
metadata: core.serialization.record(core.serialization.string(), core.serialization.unknown()),
});

export declare namespace UpdateSessionRequest {
interface Raw {
fact_rating_instruction?: FactRatingInstruction.Raw | null;
metadata: Record<string, unknown>;
}
}
24 changes: 24 additions & 0 deletions src/serialization/types/FactRatingExamples.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/**
* 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";

export const FactRatingExamples: core.serialization.ObjectSchema<
serializers.FactRatingExamples.Raw,
Zep.FactRatingExamples
> = core.serialization.object({
high: core.serialization.string().optional(),
low: core.serialization.string().optional(),
medium: core.serialization.string().optional(),
});

export declare namespace FactRatingExamples {
interface Raw {
high?: string | null;
low?: string | null;
medium?: string | null;
}
}
23 changes: 23 additions & 0 deletions src/serialization/types/FactRatingInstruction.ts
Original file line number Diff line number Diff line change
@@ -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 { FactRatingExamples } from "./FactRatingExamples";

export const FactRatingInstruction: core.serialization.ObjectSchema<
serializers.FactRatingInstruction.Raw,
Zep.FactRatingInstruction
> = core.serialization.object({
examples: FactRatingExamples.optional(),
instruction: core.serialization.string().optional(),
});

export declare namespace FactRatingInstruction {
interface Raw {
examples?: FactRatingExamples.Raw | null;
instruction?: string | null;
}
}
14 changes: 14 additions & 0 deletions src/serialization/types/SearchScope.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/**
* 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";

export const SearchScope: core.serialization.Schema<serializers.SearchScope.Raw, Zep.SearchScope> =
core.serialization.enum_(["messages", "summary", "facts"]);

export declare namespace SearchScope {
type Raw = "messages" | "summary" | "facts";
}
14 changes: 14 additions & 0 deletions src/serialization/types/SearchType.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/**
* 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";

export const SearchType: core.serialization.Schema<serializers.SearchType.Raw, Zep.SearchType> =
core.serialization.enum_(["similarity", "mmr"]);

export declare namespace SearchType {
type Raw = "similarity" | "mmr";
}
Loading

0 comments on commit 3431dfb

Please sign in to comment.