Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Viduni Wickramarachchi <[email protected]>
  • Loading branch information
arturoliduena and viduni94 committed Dec 12, 2024
1 parent 446fcb8 commit b255b5d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -484,8 +484,8 @@ export class ObservabilityAIAssistantClient {
let tools: Record<string, { description: string; schema: any }> | undefined;
let toolChoice: ToolChoiceType | { function: string } | undefined;

if (functions && functions.length > 0) {
tools = functions?.reduce((acc, fn) => {
if (functions?.length) {
tools = functions.reduce((acc, fn) => {
acc[fn.name] = {
description: fn.description,
schema: fn.parameters,
Expand Down

0 comments on commit b255b5d

Please sign in to comment.