-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore (ui/solid): update solidjs useChat and useCompletion to feature…
… parity with React (#2095) Co-authored-by: Ian Pascoe <[email protected]> Co-authored-by: Ian Pascoe <[email protected]>
- Loading branch information
1 parent
ef7bc10
commit c908f74
Showing
36 changed files
with
2,948 additions
and
2,345 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
'@ai-sdk/solid': patch | ||
'ai': patch | ||
--- | ||
|
||
chore (ui/solid): update solidjs useChat and useCompletion to feature parity with React |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { defineConfig } from '@solidjs/start/config'; | ||
|
||
export default defineConfig({}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,29 @@ | ||
{ | ||
"name": "solidstart-openai", | ||
"private": true, | ||
"type": "module", | ||
"scripts": { | ||
"dev": "solid-start dev", | ||
"build": "solid-start build", | ||
"start": "solid-start start" | ||
"dev": "vinxi dev", | ||
"build": "vinxi build", | ||
"start": "vinxi start" | ||
}, | ||
"type": "module", | ||
"devDependencies": { | ||
"autoprefixer": "^10.4.13", | ||
"postcss": "^8.4.21", | ||
"solid-start-node": "0.3.10", | ||
"tailwindcss": "^3.2.4", | ||
"typescript": "^4.9.4", | ||
"vite": "^4.1.4" | ||
"autoprefixer": "^10.4.19", | ||
"postcss": "^8.4.38", | ||
"tailwindcss": "^3.4.3", | ||
"vinxi": "^0.3.12" | ||
}, | ||
"dependencies": { | ||
"@ai-sdk/openai": "latest", | ||
"@ai-sdk/solid": "latest", | ||
"@solidjs/meta": "0.29.3", | ||
"@solidjs/router": "0.8.2", | ||
"@solidjs/meta": "0.29.4", | ||
"@solidjs/router": "^0.13.6", | ||
"@solidjs/start": "^1.0.2", | ||
"ai": "latest", | ||
"openai": "4.47.1", | ||
"solid-js": "1.8.7", | ||
"solid-start": "0.3.10", | ||
"undici": "^5.15.1" | ||
"solid-js": "^1.8.17", | ||
"zod": "^3.23.8" | ||
}, | ||
"engines": { | ||
"node": ">=16" | ||
}, | ||
"version": "0.0.0" | ||
"node": ">=18" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
module.exports = { | ||
plugins: { | ||
tailwindcss: {}, | ||
autoprefixer: {} | ||
} | ||
autoprefixer: {}, | ||
}, | ||
} |
2 changes: 1 addition & 1 deletion
2
examples/solidstart-openai/src/root.css → examples/solidstart-openai/src/app.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
@tailwind base; | ||
@tailwind components; | ||
@tailwind utilities; | ||
@tailwind utilities; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { Router } from '@solidjs/router'; | ||
import { FileRoutes } from '@solidjs/start/router'; | ||
import { Suspense } from 'solid-js'; | ||
|
||
import './app.css'; | ||
|
||
export default function App() { | ||
return ( | ||
<Router | ||
root={props => ( | ||
<> | ||
<Suspense>{props.children}</Suspense> | ||
</> | ||
)} | ||
> | ||
<FileRoutes /> | ||
</Router> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
import { mount, StartClient } from 'solid-start/entry-client'; | ||
// @refresh reload | ||
import { mount, StartClient } from '@solidjs/start/client'; | ||
|
||
mount(() => <StartClient />, document); | ||
mount(() => <StartClient />, document.getElementById('app')!); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,21 @@ | ||
import { | ||
StartServer, | ||
createHandler, | ||
renderAsync, | ||
} from 'solid-start/entry-server'; | ||
// @refresh reload | ||
import { createHandler, StartServer } from '@solidjs/start/server'; | ||
|
||
export default createHandler( | ||
renderAsync(event => <StartServer event={event} />), | ||
); | ||
export default createHandler(() => ( | ||
<StartServer | ||
document={({ assets, children, scripts }) => ( | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
<link rel="icon" href="/favicon.ico" /> | ||
{assets} | ||
</head> | ||
<body> | ||
<div id="app">{children}</div> | ||
{scripts} | ||
</body> | ||
</html> | ||
)} | ||
/> | ||
)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/// <reference types="@solidjs/start/env" /> |
This file was deleted.
Oops, something went wrong.
92 changes: 0 additions & 92 deletions
92
examples/solidstart-openai/src/routes/api/chat-with-functions/index.ts
This file was deleted.
Oops, something went wrong.
43 changes: 0 additions & 43 deletions
43
examples/solidstart-openai/src/routes/api/chat-with-vision/index.ts
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.