Skip to content

Commit

Permalink
Add API test for get_alerts_dataset_info tool
Browse files Browse the repository at this point in the history
  • Loading branch information
sorenlouv committed Feb 28, 2025
1 parent 300e350 commit 93f9b84
Show file tree
Hide file tree
Showing 5 changed files with 629 additions and 58 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import { MessageRole, ShortIdTable, type Message } from '../../../common';
import { concatenateChatCompletionChunks } from '../../../common/utils/concatenate_chat_completion_chunks';
import { FunctionCallChatFunction } from '../../service/types';

const SELECT_RELEVANT_FIELDS_NAME = 'select_relevant_fields';

export async function getRelevantFieldNames({
index,
start,
Expand Down Expand Up @@ -122,7 +124,7 @@ export async function getRelevantFieldNames({
],
functions: [
{
name: 'select_relevant_fields',
name: SELECT_RELEVANT_FIELDS_NAME,
description: 'The IDs of the fields you consider relevant to the conversation',
parameters: {
type: 'object',
Expand All @@ -138,7 +140,7 @@ export async function getRelevantFieldNames({
} as const,
},
],
functionCall: 'select_relevant_fields',
functionCall: SELECT_RELEVANT_FIELDS_NAME,
})
).pipe(concatenateChatCompletionChunks());

Expand Down
Loading

0 comments on commit 93f9b84

Please sign in to comment.