File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
packages/ai-vercel-adapter/src Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change 1
- import { ApolloLink } from "@apollo/client" ;
2
1
import { type LanguageModel , generateObject } from "ai" ;
3
2
import { AIAdapter } from "@apollo/client-ai" ;
4
3
import { isFormattedExecutionResult } from "@apollo/client/utilities" ;
@@ -26,15 +25,15 @@ export class VercelAIAdapter extends AIAdapter {
26
25
this . model = options . model ;
27
26
}
28
27
29
- public async generateResponseForOperation (
30
- operation : ApolloLink . Operation ,
31
- prompt : string
28
+ public async generateObject (
29
+ prompt : string ,
30
+ systemPrompt : string
32
31
) : Promise < AIAdapter . Result > {
33
32
const promptOptions : GenerateObjectOptions = {
34
33
mode : "json" ,
35
34
model : this . model ,
36
- prompt : this . createPrompt ( operation , prompt ) ,
37
- system : this . systemPrompt ,
35
+ prompt,
36
+ system : systemPrompt ,
38
37
output : "no-schema" ,
39
38
} ;
40
39
You can’t perform that action at this time.
0 commit comments