Skip to content

Commit 5a6b850

Browse files
Merge branch 'main' of github.com:OpenAssistantGPT/OpenAssistantGPT-SDK into feat/download-pdf-transcript
2 parents eca1a10 + b16164c commit 5a6b850

10 files changed

Lines changed: 299 additions & 82 deletions

File tree

.changeset/chilled-kids-taste.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

examples/next-website/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"@openassistantgpt/react": "^0.3.0",
1414
"@openassistantgpt/ui": "^0.3.0",
1515
"@radix-ui/react-dialog": "^1.1.1",
16-
"@radix-ui/react-icons": "^1.3.0",
16+
"@radix-ui/react-icons": "^1.3.2",
1717
"@radix-ui/react-label": "^2.1.0",
1818
"@radix-ui/react-slot": "^1.1.0",
1919
"buffer": "^6.0.3",

packages/core/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# core
22

3+
## 0.3.14
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [d252e75]
8+
- @openassistantgpt/ui@0.3.13
9+
310
## 0.3.13
411

512
### Patch Changes

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "openassistantgpt",
3-
"version": "0.3.13",
3+
"version": "0.3.14",
44
"license": "Apache-2.0",
55
"sideEffects": false,
66
"main": "./dist/index.js",

packages/react/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"dependencies": {
2828
"@ai-sdk/provider-utils": "1.0.5",
2929
"@ai-sdk/ui-utils": "0.0.20",
30-
"@vitejs/plugin-react": "^4.3.1",
30+
"@vitejs/plugin-react": "^4.3.4",
3131
"ai": "^3.2.24",
3232
"openai": "^4.52.7",
3333
"swr": "2.2.5"

packages/ui/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @openassistantgpt/ui
22

3+
## 0.3.13
4+
5+
### Patch Changes
6+
7+
- d252e75: Remove option to stop the api and make sure a user can't send a message twice
8+
39
## 0.3.12
410

511
### Patch Changes

packages/ui/components/chat-pdf-export.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React from 'react';
1+
import React, { ReactNode } from 'react';
22
import {
33
Document,
44
Page,
@@ -175,7 +175,7 @@ const ChatPDFDocument: React.FC<ChatPDFDocumentProps> = ({
175175
{/* Chat Messages */}
176176
{messages.map((message, index) => (
177177
<View
178-
key={index}
178+
key={`message-${index}`}
179179
style={[
180180
styles.messageContainer,
181181
message.role === 'user'
@@ -235,7 +235,7 @@ export const generateChatPDF = async (
235235
chatbot={chatbot}
236236
timestamp={timestamp}
237237
/>
238-
);
238+
) as React.ReactElement;
239239

240240
const pdfBlob = await pdf(doc).toBlob();
241241
return pdfBlob;

packages/ui/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@openassistantgpt/ui",
3-
"version": "0.3.12",
3+
"version": "0.3.13",
44
"license": "Apache-2.0",
55
"sideEffects": false,
66
"main": "./dist/index.js",
@@ -31,7 +31,7 @@
3131
"@openassistantgpt/react": "workspace:^",
3232
"@radix-ui/react-dialog": "^1.1.1",
3333
"@radix-ui/react-dropdown-menu": "^2.1.1",
34-
"@radix-ui/react-icons": "^1.3.0",
34+
"@radix-ui/react-icons": "^1.3.2",
3535
"@radix-ui/react-label": "^2.1.0",
3636
"@radix-ui/react-toast": "^1.2.1",
3737
"@radix-ui/react-tooltip": "^1.1.2",

packages/ui/types/react-pdf.d.ts

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
declare module '@react-pdf/renderer' {
2+
import * as React from 'react';
3+
4+
export interface DocumentProps {
5+
title?: string;
6+
author?: string;
7+
subject?: string;
8+
keywords?: string;
9+
creator?: string;
10+
producer?: string;
11+
children?: React.ReactNode;
12+
}
13+
14+
export interface PageProps {
15+
size?: string | { width: number; height: number };
16+
orientation?: 'portrait' | 'landscape';
17+
style?: any;
18+
wrap?: boolean;
19+
children?: React.ReactNode;
20+
}
21+
22+
export interface ViewProps {
23+
style?: any;
24+
wrap?: boolean;
25+
break?: boolean;
26+
children?: React.ReactNode;
27+
}
28+
29+
export interface TextProps {
30+
style?: any;
31+
wrap?: boolean;
32+
break?: boolean;
33+
render?: (props: { pageNumber: number; totalPages: number }) => string;
34+
fixed?: boolean;
35+
children?: React.ReactNode;
36+
}
37+
38+
export const Document: React.FC<React.PropsWithChildren<DocumentProps>>;
39+
export const Page: React.FC<React.PropsWithChildren<PageProps>>;
40+
export const View: React.FC<React.PropsWithChildren<ViewProps>>;
41+
export const Text: React.FC<React.PropsWithChildren<TextProps>>;
42+
43+
export const StyleSheet: {
44+
create: (styles: any) => any;
45+
};
46+
47+
export const pdf: (element: React.ReactElement) => {
48+
toBlob: () => Promise<Blob>;
49+
toBuffer: () => Promise<Buffer>;
50+
};
51+
}

0 commit comments

Comments
 (0)