Spaces:
Build error
Build error
Add ai package and revert imports to use it
Browse files- app/api/analyze-edit-intent/route.ts +1 -1
- app/api/text-generation/route.ts +1 -2
- package.json +1 -0
app/api/analyze-edit-intent/route.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { createGroq } from '@ai-sdk/groq';
|
|
| 3 |
import { createAnthropic } from '@ai-sdk/anthropic';
|
| 4 |
import { createOpenAI } from '@ai-sdk/openai';
|
| 5 |
import { createGoogleGenerativeAI } from '@ai-sdk/google';
|
| 6 |
-
import { generateObject } from '
|
| 7 |
import { z } from 'zod';
|
| 8 |
// import type { FileManifest } from '@/types/file-manifest'; // Type is used implicitly through manifest parameter
|
| 9 |
|
|
|
|
| 3 |
import { createAnthropic } from '@ai-sdk/anthropic';
|
| 4 |
import { createOpenAI } from '@ai-sdk/openai';
|
| 5 |
import { createGoogleGenerativeAI } from '@ai-sdk/google';
|
| 6 |
+
import { generateObject } from 'ai';
|
| 7 |
import { z } from 'zod';
|
| 8 |
// import type { FileManifest } from '@/types/file-manifest'; // Type is used implicitly through manifest parameter
|
| 9 |
|
app/api/text-generation/route.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
| 1 |
import OpenAI from 'openai';
|
| 2 |
-
import { StreamingTextResponse } from 'ai
|
| 3 |
-
import { OpenAIStream } from '@ai-sdk/openai/stream';
|
| 4 |
|
| 5 |
// Create an OpenAI API client (that's edge friendly!)
|
| 6 |
const openai = new OpenAI({
|
|
|
|
| 1 |
import OpenAI from 'openai';
|
| 2 |
+
import { OpenAIStream, StreamingTextResponse } from 'ai';
|
|
|
|
| 3 |
|
| 4 |
// Create an OpenAI API client (that's edge friendly!)
|
| 5 |
const openai = new OpenAI({
|
package.json
CHANGED
|
@@ -76,6 +76,7 @@
|
|
| 76 |
"react-icons": "^5.5.0",
|
| 77 |
"react-syntax-highlighter": "^15.6.1",
|
| 78 |
"sonner": "^2.0.7",
|
|
|
|
| 79 |
"tailwind-gradient-mask-image": "^1.2.0",
|
| 80 |
"tailwind-merge": "^3.3.1",
|
| 81 |
"tailwindcss-animate": "^1.0.7",
|
|
|
|
| 76 |
"react-icons": "^5.5.0",
|
| 77 |
"react-syntax-highlighter": "^15.6.1",
|
| 78 |
"sonner": "^2.0.7",
|
| 79 |
+
"ai": "^3.0.41",
|
| 80 |
"tailwind-gradient-mask-image": "^1.2.0",
|
| 81 |
"tailwind-merge": "^3.3.1",
|
| 82 |
"tailwindcss-animate": "^1.0.7",
|