Skip to content

Commit

Permalink
allow passing chatid
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristopherChudzicki committed Jan 22, 2025
1 parent 4493df4 commit e2a2b0c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/AiChat/AiChat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ const classes = {
}

const AiChat: React.FC<AiChatProps> = function AiChat({
chatId,
className,
conversationStarters,
requestOpts,
Expand All @@ -143,6 +144,7 @@ const AiChat: React.FC<AiChatProps> = function AiChat({
isLoading,
} = useAiChat(requestOpts, {
initialMessages: initialMessages,
id: chatId,
})

const messages = React.useMemo(() => {
Expand Down
1 change: 1 addition & 0 deletions src/components/AiChat/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ type RequestOpts = {
}

type AiChatProps = {
chatId?: string
className?: string
initialMessages: Omit<ChatMessage, "id">[]
conversationStarters?: { content: string }[]
Expand Down

0 comments on commit e2a2b0c

Please sign in to comment.