Skip to content

Commit ccfbb9e

Browse files
authored
added popover to display links to suggested models (#625)
Signed-off-by: saimedhi <saimedhi@amazon.com>
1 parent 068bb10 commit ccfbb9e

File tree

5 files changed

+523
-28
lines changed

5 files changed

+523
-28
lines changed

common/constants.ts

+52
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,11 @@ export enum MODEL_TYPE {
202202
SPARSE_ENCODER = 'sparse_encoder',
203203
}
204204

205+
export enum MODEL_CATEGORY {
206+
EMBEDDING = 'EMBEDDING',
207+
LLM = 'LLM',
208+
}
209+
205210
/**
206211
* Various constants pertaining to the drag-and-drop UI components
207212
*/
@@ -262,6 +267,27 @@ export const ML_RESPONSE_PROCESSOR_EXAMPLE_DOCS_LINK =
262267
export const UPDATE_MODEL_DOCS_LINK =
263268
'https://opensearch.org/docs/latest/ml-commons-plugin/api/model-apis/update-model/';
264269

270+
// Large Language Models Documentation Links
271+
export const BEDROCK_CLAUDE_3_SONNET_DOCS_LINK =
272+
'https://github.com/opensearch-project/dashboards-flow-framework/blob/main/documentation/models.md#claude-3-sonnet-hosted-on-amazon-bedrock';
273+
274+
export const OPENAI_GPT35_DOCS_LINK =
275+
'https://github.com/opensearch-project/dashboards-flow-framework/blob/main/documentation/models.md#openai-gpt-35';
276+
277+
export const DEEPSEEK_CHAT_DOCS_LINK =
278+
'https://github.com/opensearch-project/dashboards-flow-framework/blob/main/documentation/models.md#deepseek-chat';
279+
280+
// Embedding Models Documentation Links
281+
export const COHERE_EMBEDDING_MODEL_DOCS_LINK =
282+
'https://github.com/opensearch-project/dashboards-flow-framework/blob/main/documentation/models.md#cohere-embed';
283+
284+
export const BEDROCK_TITAN_EMBEDDING_DOCS_LINK =
285+
'https://github.com/opensearch-project/dashboards-flow-framework/blob/main/documentation/models.md#amazon-bedrock-titan-text-embedding';
286+
287+
// ML Models setup Documentation Link
288+
export const ML_MODELS_SETUP_DOCS_LINK =
289+
'https://github.com/opensearch-project/dashboards-flow-framework/blob/main/documentation/models.md';
290+
265291
/**
266292
* Text chunking algorithm constants
267293
*/
@@ -431,6 +457,24 @@ export const SEMANTIC_SEARCH_QUERY_NEURAL = {
431457
},
432458
},
433459
};
460+
export const SEMANTIC_SEARCH_TEMPLATE_QUERY = {
461+
query: {
462+
template: {
463+
knn: {
464+
[VECTOR_FIELD_PATTERN]: {
465+
vector: VECTOR_PATTERN,
466+
k: 2,
467+
},
468+
},
469+
},
470+
},
471+
ext: {
472+
ml_inference: {
473+
text: QUERY_TEXT_PATTERN,
474+
},
475+
},
476+
};
477+
434478
export const MULTIMODAL_SEARCH_QUERY_NEURAL = {
435479
_source: {
436480
excludes: [VECTOR_FIELD_PATTERN],
@@ -596,6 +640,14 @@ export const QUERY_PRESETS = [
596640
name: WORKFLOW_TYPE.MULTIMODAL_SEARCH,
597641
query: customStringify(MULTIMODAL_SEARCH_QUERY_BOOL),
598642
},
643+
{
644+
name: 'Semantic search (neural query)',
645+
query: customStringify(SEMANTIC_SEARCH_QUERY_NEURAL),
646+
},
647+
{
648+
name: 'Semantic search (template query)',
649+
query: customStringify(SEMANTIC_SEARCH_TEMPLATE_QUERY),
650+
},
599651
{
600652
name: `Hybrid search (match & k-NN queries)`,
601653
query: customStringify(HYBRID_SEARCH_QUERY_MATCH_KNN),

0 commit comments

Comments
 (0)