File tree Expand file tree Collapse file tree 3 files changed +12
-4
lines changed
Expand file tree Collapse file tree 3 files changed +12
-4
lines changed Original file line number Diff line number Diff line change 2323 " simulation" ,
2424 " typescript"
2525 ],
26- "author" : " " ,
27- "license" : " ISC " ,
26+ "author" : " margostino " ,
27+ "license" : " Apache-2.0 " ,
2828 "dependencies" : {
2929 "@asteasolutions/zod-to-openapi" : " ^7.3.0" ,
3030 "@types/jsonwebtoken" : " ^9.0.10" ,
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ export const createAiProcessor = ({
1414} : {
1515 systemPrompt : string ;
1616 model ?: string ;
17- schema ?: z . ZodTypeAny ;
17+ schema ?: z . ZodType < any > ;
1818} ) => {
1919 const openai : OpenAI = new OpenAI ( ) ;
2020
@@ -38,9 +38,11 @@ export const createAiProcessor = ({
3838 } ;
3939
4040 if ( schema ) {
41+ // @ts -expect-error - zodResponseFormat causes deep type instantiation with complex schemas
42+ const responseFormat = zodResponseFormat ( schema , 'output' ) ;
4143 completionParams = {
4244 ...completionParams ,
43- response_format : zodResponseFormat ( schema , 'output' ) ,
45+ response_format : responseFormat ,
4446 } ;
4547 }
4648
Original file line number Diff line number Diff line change 1+ export default ( ) => {
2+ process . env . NODE_ENV = 'test' ;
3+ process . env . LOG_LEVEL = 'error' ;
4+ process . env . JWT_SECRET = 'test-secret-key' ;
5+ process . env . JWT_EXPIRES_IN = '7d' ;
6+ } ;
You can’t perform that action at this time.
0 commit comments