Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync JS Models #942

Merged
merged 1 commit into from
Aug 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 21 additions & 13 deletions js/sdk/src/models.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,34 +17,36 @@ export interface RefreshTokenResponse {
}

export interface GenerationConfig {
model?: string;
temperature?: number;
top_p?: number;
top_k?: number;
max_tokens_to_sample?: number;
model?: string;
stream?: boolean;
functions?: Array<Record<string, any>>;
skip_special_tokens?: boolean;
stop_token?: string;
num_beams?: number;
do_sample?: boolean;
generate_with_chat?: boolean;
tools?: Array<Record<string, any>>;
add_generation_kwargs?: Record<string, any>;
api_base?: string;
}

export interface HybridSearchSettings {
full_text_weight: number;
semantic_weight: number;
full_text_limit: number;
rrf_k: number;
}

export interface VectorSearchSettings {
use_vector_search?: boolean;
use_hybrid_search?: boolean;
filters?: Record<string, any>;
search_limit?: number;
selected_group_ids?: string[];
// TODO: add index measure
// TODO: add include vars
// TODO: add include metadatas
// TODO: add include probes
// TODO: add ef_search
// TODO: add hybrid_search_settings
index_measure: IndexMeasure;
include_values?: boolean;
include_metadatas?: boolean;
probes?: number;
ef_search?: number;
hybrid_search_settings?: HybridSearchSettings;
}

export interface KGSearchSettings {
Expand All @@ -66,3 +68,9 @@ export interface Message {
export interface R2RDocumentChunksRequest {
document_id: string;
}

export enum IndexMeasure {
COSINE_DISTANCE = "cosine_distance",
L2_DISTANCE = "l2_distance",
MAX_INNER_PRODUCT = "max_inner_product",
}
Loading