Skip to content

Commit

Permalink
feat: update code
Browse files Browse the repository at this point in the history
  • Loading branch information
marcolivierbouch committed Jul 18, 2024
1 parent d75bc12 commit 9ede7c9
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 13 deletions.
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/1.bug_report.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: Bug report
description: Create a bug report for the AI SDK.
description: Create a bug report for the OpenAssistantGPT SDK.
labels: []
body:
- type: markdown
attributes:
value: |
This template is to report bugs for the AI SDK. If you need help with your own project, feel free to [start a new thread in our discussions](https://github.com/vercel/ai/discussions).
This template is to report bugs for the OpenAsistantGPT SDK. If you need help with your own project, feel free to [start a new thread in our discussions](https://github.com/vercel/ai/discussions).
- type: textarea
attributes:
label: Description
Expand All @@ -20,7 +20,7 @@ body:
description: Provide an example code snippet that has the problem
placeholder: |
import OpenAI from 'openai';
import { OpenAIStream, StreamingTextResponse } from 'ai';
import { Chatbot } from '@openassistantgpt/ui';
...
- type: textarea
attributes:
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/2.feature_request.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: Feature Request
description: Propose a new feature for the AI SDK.
description: Propose a new feature for the OpenAssistantGPT SDK.
labels: []
body:
- type: markdown
attributes:
value: |
This template is to propose new features for the AI SDK. If you need help with your own project, feel free to [start a new thread in our discussions](https://github.com/vercel/ai/discussions).
This template is to propose new features for the OpenAssistantGPT SDK. If you need help with your own project, feel free to [start a new thread in our discussions](https://github.com/vercel/ai/discussions).
- type: textarea
attributes:
label: Feature Description
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Contributing to the Vercel AI SDK
# Contributing to the OpenAssistantGPT SDK

We deeply appreciate your interest in contributing to our repository! Whether you're reporting bugs, suggesting enhancements, improving docs, or submitting pull requests, your contributions help improve the project for everyone.

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# OpenAssistantGPT SDK

This SDK is an extension of the vercel/ai sdk with more features and a UI maintained by the OpenAssistantGPT team.
This SDK is an extension of the vercel/ai SDK with more features, addapted to our use case and maintained by the OpenAssistantGPT team.
1 change: 1 addition & 0 deletions examples/next-website/app/api/assistant/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export async function POST(req: Request) {
if (data.filename !== '') {
// @ts-ignore
const file = new File([data.file], data.filename, {
// @ts-ignore
type: data.file.type,
});

Expand Down
2 changes: 1 addition & 1 deletion examples/next-website/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export default function ChatPage() {

return (
<TooltipProvider>
<Chat chatbot={bot} apiUrl="/api/assistant" defaultMessage="" />
<Chat chatbot={bot} path="/api/assistant" defaultMessage="" />
</TooltipProvider>
);
}
2 changes: 1 addition & 1 deletion packages/ui/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# @ai-sdk/react
# @openassistantgpt/ui
12 changes: 8 additions & 4 deletions packages/ui/components/chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import { ChatHistory } from '@/components/chat-history';
interface ChatbotProps {
chatbot: any;
defaultMessage: string;
apiUrl: string;
path: string;
className?: string;
withExitX?: boolean;
clientSidePrompt?: string;
Expand All @@ -42,7 +42,7 @@ interface ChatbotProps {
export function Chat({
chatbot,
defaultMessage,
apiUrl,
path,
className,
withExitX = false,
clientSidePrompt,
Expand Down Expand Up @@ -74,7 +74,7 @@ export function Chat({
deleteThreadFromHistory,
} = useAssistant({
id: chatbot.id,
api: apiUrl.replace('%ID%', chatbot.id),
api: path,
inputFile: inputFileRef.current?.files
? inputFileRef.current.files[0]
: undefined,
Expand Down Expand Up @@ -356,7 +356,11 @@ export function Chat({
<span className="font-sm text-gray-800 truncate">
{inputFileRef.current?.files![0].name}
</span>
<span className="text-sm text-gray-500">Document</span>
<span className="text-sm text-gray-500">
{inputFileRef.current?.files![0].type === 'image/jpeg'
? 'Image'
: 'Document'}
</span>
</div>
<Button
type="button"
Expand Down

0 comments on commit 9ede7c9

Please sign in to comment.