Skip to content

Commit

Permalink
Merge pull request #7 from zerodays/feat/export-more-types
Browse files Browse the repository at this point in the history
Export more types
  • Loading branch information
horvatz authored Apr 9, 2024
2 parents 37670e3 + 8a858a2 commit fdb1b89
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
export * from './hooks/use-chat';
export * from './openai/openai';
export {
ChatCompletionMessageOrReactElement,
Tool,
} from './openai/chat-completion';
export { isReactElement } from './openai/utils';
2 changes: 1 addition & 1 deletion src/openai/chat-completion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export type ChatCompletionMessageOrReactElement =
// Takes a description (visible to model)
// Parameters (zod schema), that are converted to json schema and then sent to the model
// Render function that takes the parameters and returns a generator that yields components, then returns both data and a component to display
interface Tool<Z extends z.Schema> {
export interface Tool<Z extends z.Schema> {
description: string;
parameters: Z;
render: (args: z.infer<Z>) => ToolRenderReturnType;
Expand Down

0 comments on commit fdb1b89

Please sign in to comment.