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

added popover to display links to suggested models #625

Merged
merged 4 commits into from
Feb 21, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
52 changes: 52 additions & 0 deletions common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,11 @@ export enum MODEL_TYPE {
SPARSE_ENCODER = 'sparse_encoder',
}

export enum MODEL_CATEGORY {
EMBEDDING = 'EMBEDDING',
LLM = 'LLM',
}

/**
* Various constants pertaining to the drag-and-drop UI components
*/
Expand Down Expand Up @@ -262,6 +267,27 @@ export const ML_RESPONSE_PROCESSOR_EXAMPLE_DOCS_LINK =
export const UPDATE_MODEL_DOCS_LINK =
'https://opensearch.org/docs/latest/ml-commons-plugin/api/model-apis/update-model/';

// Large Language Models Documentation Links
export const BEDROCK_CLAUDE_3_SONNET_DOCS_LINK =
'https://github.com/opensearch-project/dashboards-flow-framework/blob/main/documentation/models.md#claude-3-sonnet-hosted-on-amazon-bedrock';

export const OPENAI_GPT35_DOCS_LINK =
'https://github.com/opensearch-project/dashboards-flow-framework/blob/main/documentation/models.md#openai-gpt-35';

export const DEEPSEEK_CHAT_DOCS_LINK =
'https://github.com/opensearch-project/dashboards-flow-framework/blob/main/documentation/models.md#deepseek-chat';

// Embedding Models Documentation Links
export const COHERE_EMBEDDING_MODEL_DOCS_LINK =
'https://github.com/opensearch-project/dashboards-flow-framework/blob/main/documentation/models.md#cohere-embed';

export const BEDROCK_TITAN_EMBEDDING_DOCS_LINK =
'https://github.com/opensearch-project/dashboards-flow-framework/blob/main/documentation/models.md#amazon-bedrock-titan-text-embedding';

// ML Models setup Documentation Link
export const ML_MODELS_SETUP_DOCS_LINK =
'https://github.com/opensearch-project/dashboards-flow-framework/blob/main/documentation/models.md';

/**
* Text chunking algorithm constants
*/
Expand Down Expand Up @@ -350,6 +376,24 @@ export const SEMANTIC_SEARCH_QUERY_NEURAL = {
},
},
};
export const SEMANTIC_SEARCH_TEMPLATE_QUERY = {
query: {
template: {
knn: {
[VECTOR_FIELD_PATTERN]: {
vector: VECTOR_PATTERN,
k: 2,
},
},
},
},
ext: {
ml_inference: {
text: QUERY_TEXT_PATTERN,
},
},
};

export const MULTIMODAL_SEARCH_QUERY_NEURAL = {
_source: {
excludes: [VECTOR_FIELD_PATTERN],
Expand Down Expand Up @@ -479,6 +523,14 @@ export const QUERY_PRESETS = [
name: WORKFLOW_TYPE.MULTIMODAL_SEARCH,
query: customStringify(MULTIMODAL_SEARCH_QUERY_BOOL),
},
{
name: 'Semantic search (neural query)',
query: customStringify(SEMANTIC_SEARCH_QUERY_NEURAL),
},
{
name: 'Semantic search (template query)',
query: customStringify(SEMANTIC_SEARCH_TEMPLATE_QUERY),
},
{
name: `Hybrid search (match & k-NN queries)`,
query: customStringify(HYBRID_SEARCH_QUERY_MATCH_KNN),
Expand Down
Loading
Loading