Skip to content

Commit

Permalink
Fix compilation error
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubknejzlik committed Aug 12, 2024
1 parent 205dec5 commit 99ff063
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/completions/completion-with-functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import OpenAI from 'openai'
import { z } from 'zod'
import type { ChatCompletionFunction } from '../function'

import zodToJsonSchema from 'zod-to-json-schema'
import { zodFunction } from 'openai/helpers/zod'

type CompletionOpts = Partial<
Expand Down
4 changes: 2 additions & 2 deletions src/function.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ import { zodToJsonSchema } from 'zod-to-json-schema'
export type ChatCompletionFunction<T extends z.ZodRawShape = any> = {
name: string
description?: string
parameters?: z.ZodObject<T>
parameters: z.ZodObject<T>
handler: (params: T) => Promise<string>
}

interface createChatCompletionFunctionOpts<P extends z.ZodRawShape> {
name: string
description?: string
parameters?: z.ZodObject<P>
parameters: z.ZodObject<P>
handler: (params: z.infer<z.ZodObject<P>>) => Promise<string>
}

Expand Down

0 comments on commit 99ff063

Please sign in to comment.