Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nextjs Recipe demo throws 400 Invalid schema for function 'print' #539

Open
sahilmob opened this issue Mar 4, 2024 · 0 comments
Open

Nextjs Recipe demo throws 400 Invalid schema for function 'print' #539

sahilmob opened this issue Mar 4, 2024 · 0 comments

Comments

@sahilmob
Copy link

sahilmob commented Mar 4, 2024

I'm trying to run the Nextjs recipe demo, but i get the following error in the server console

 Error: failed to pipe response
    at pipeToNodeResponse (path_to_repo_directory\node_modules\next\dist\server\pipe-readable.js:111:15)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async sendResponse (path_to_repo_directory\node_modules\next\dist\server\send-response.js:40:13)
    at async doRender (path_to_repo_directory\node_modules\next\dist\server\base-server.js:1364:25)
    at async cacheEntry.responseCache.get.routeKind (path_to_repo_directoryt\node_modules\next\dist\server\base-server.js:1556:28)
    at async DevServer.renderToResponseWithComponentsImpl (path_to_repo_directoryt\node_modules\next\dist\server\base-server.js:1464:28)
    at async DevServer.renderPageComponent (path_to_repo_directory\node_modules\next\dist\server\base-server.js:1861:24)
    at async DevServer.renderToResponseImpl (path_to_repo_directory\node_modules\next\dist\server\base-server.js:1899:32)
    at async DevServer.pipeImpl (path_to_repo_directory\node_modules\next\dist\server\base-server.js:912:25)
    at async NextNodeServer.handleCatchallRenderRequest (path_to_repo_directory\node_modules\next\dist\server\next-server.js:269:17)
    at async DevServer.handleRequestImpl (path_to_repo_directory\node_modules\next\dist\server\base-server.js:808:17)
    at async path_to_repo_directory\node_modules\next\dist\server\dev\next-dev-server.js:331:20
    at async Span.traceAsyncFn (path_to_repo_directoryt\node_modules\next\dist\trace\trace.js:151:20)
    at async DevServer.handleRequest (path_to_repo_directory\node_modules\next\dist\server\dev\next-dev-server.js:328:24)
    at async invokeRender (path_to_repo_directory\node_modules\next\dist\server\lib\router-server.js:136:21)
    at async handleRequest (path_to_repo_directory\node_modules\next\dist\server\lib\router-server.js:315:24)
    at async requestHandlerImpl (path_to_repo_directoryt\node_modules\next\dist\server\lib\router-server.js:339:13)
    at async Server.requestListener (path_to_repo_directory\node_modules\next\dist\server\lib\start-server.js:140:13) {
  [cause]: AIJSXError: OpenAI API Error: 400 Invalid schema for function 'print': schema must be a JSON Schema of 'type: "object"', got 'type: "None"'.
      at OpenAIChatModel (webpack-internal:///(rsc)/./node_modules/ai-jsx/dist/esm/lib/openai.js:407:19)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at async renderStream (webpack-internal:///(rsc)/./node_modules/ai-jsx/dist/esm/core/render.js:160:26)
      at async eval (webpack-internal:///(rsc)/./node_modules/ai-jsx/dist/esm/core/render.js:231:32)
      at async renderStream (webpack-internal:///(rsc)/./node_modules/ai-jsx/dist/esm/core/render.js:147:33)
      at async eval (webpack-internal:///(rsc)/./node_modules/ai-jsx/dist/esm/core/render.js:231:32)
      at async renderStream (webpack-internal:///(rsc)/./node_modules/ai-jsx/dist/esm/core/render.js:147:33)
      at async eval (webpack-internal:///(rsc)/./node_modules/ai-jsx/dist/esm/core/render.js:231:32)
      at async renderStream (webpack-internal:///(rsc)/./node_modules/ai-jsx/dist/esm/core/render.js:147:33)
      at async eval (webpack-internal:///(rsc)/./node_modules/ai-jsx/dist/esm/core/render.js:231:32)
      at async JsonChatCompletionFunctionCall (webpack-internal:///(rsc)/./node_modules/ai-jsx/dist/esm/batteries/constrained-output.js:304:22)
      at async renderStream (webpack-internal:///(rsc)/./node_modules/ai-jsx/dist/esm/core/render.js:160:26)
      at async eval (webpack-internal:///(rsc)/./node_modules/ai-jsx/dist/esm/core/render.js:231:32)
      at async renderStream (webpack-internal:///(rsc)/./node_modules/ai-jsx/dist/esm/core/render.js:147:33)
      at async eval (webpack-internal:///(rsc)/./node_modules/ai-jsx/dist/esm/core/render.js:231:32)
      at async JsonChatCompletion (webpack-internal:///(rsc)/./node_modules/ai-jsx/dist/esm/batteries/constrained-output.js:61:16)
      at async renderStream (webpack-internal:///(rsc)/./node_modules/ai-jsx/dist/esm/core/render.js:160:26)
      at async eval (webpack-internal:///(rsc)/./node_modules/ai-jsx/dist/esm/core/render.js:231:32)
      at async renderStream (webpack-internal:///(rsc)/./node_modules/ai-jsx/dist/esm/core/render.js:147:33)
      at async eval (webpack-internal:///(rsc)/./node_modules/ai-jsx/dist/esm/core/render.js:231:32)
      at async renderStream (webpack-internal:///(rsc)/./node_modules/ai-jsx/dist/esm/core/render.js:82:16)
      at async eval (webpack-internal:///(rsc)/./node_modules/ai-jsx/dist/esm/core/render.js:231:32)
      at async UICompletion (webpack-internal:///(rsc)/./node_modules/ai-jsx/dist/esm/react/completion.js:81:29)
      at async renderStream (webpack-internal:///(rsc)/./node_modules/ai-jsx/dist/esm/core/render.js:160:26)
      at async eval (webpack-internal:///(rsc)/./node_modules/ai-jsx/dist/esm/core/render.js:231:32)
      at async renderStream (webpack-internal:///(rsc)/./node_modules/ai-jsx/dist/esm/core/render.js:147:33)
      at async eval (webpack-internal:///(rsc)/./node_modules/ai-jsx/dist/esm/core/render.js:231:32)
      at async renderStream (webpack-internal:///(rsc)/./node_modules/ai-jsx/dist/esm/core/render.js:82:16)
      at async eval (webpack-internal:///(rsc)/./node_modules/ai-jsx/dist/esm/core/render.js:231:32) {
    code: 1032,
    blame: 'ambiguous',
    metadata: {
      message: `Invalid schema for function 'print': schema must be a JSON Schema of 'type: "object"', got 'type: "None"'.`,
      type: 'invalid_request_error',
      param: null,
      code: null
    }
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant