Skip to content

Commit

Permalink
Remove categories/queries where needed
Browse files Browse the repository at this point in the history
  • Loading branch information
dgieselaar committed Jun 7, 2024
1 parent aabe6f7 commit 28ce486
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,6 @@ export function createService({
return of(
createFunctionRequestMessage({
name: 'context',
args: {
queries: [],
categories: [],
},
}),
createFunctionResponseMessage({
name: 'context',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ async function retrieveSuggestions({
}) {
const recallResponse = await client.recall({
queries,
categories: [],
});

return recallResponse.entries.map((entry) => omit(entry, 'labels', 'is_correction'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,5 @@ export function getContextFunctionRequestIfNeeded(

return createFunctionRequestMessage({
name: CONTEXT_FUNCTION_NAME,
args: {
queries: [],
categories: [],
},
});
}
Original file line number Diff line number Diff line change
Expand Up @@ -1232,7 +1232,7 @@ describe('Observability AI Assistant client', () => {
role: MessageRole.Assistant,
function_call: {
name: CONTEXT_FUNCTION_NAME,
arguments: JSON.stringify({ queries: [], categories: [] }),
arguments: JSON.stringify({}),
trigger: MessageRole.Assistant,
},
},
Expand Down Expand Up @@ -1456,7 +1456,7 @@ describe('Observability AI Assistant client', () => {
role: MessageRole.Assistant,
function_call: {
name: CONTEXT_FUNCTION_NAME,
arguments: JSON.stringify({ queries: [], categories: [] }),
arguments: JSON.stringify({}),
trigger: MessageRole.Assistant,
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ describe('<ChatBody>', () => {
role: 'assistant',
function_call: {
name: CONTEXT_FUNCTION_NAME,
arguments: '{"queries":[],"categories":[]}',
arguments: '{}',
trigger: 'assistant',
},
content: '',
Expand Down Expand Up @@ -88,7 +88,7 @@ describe('<ChatBody>', () => {
role: 'assistant',
function_call: {
name: CONTEXT_FUNCTION_NAME,
arguments: '{"queries":[],"categories":[]}',
arguments: '{}',
trigger: 'assistant',
},
content: '',
Expand Down

0 comments on commit 28ce486

Please sign in to comment.