Giter Site home page Giter Site logo

[perplexity] streamObject fails about ai HOT 7 OPEN

louis030195 avatar louis030195 commented on July 17, 2024
[perplexity] streamObject fails

from ai.

Comments (7)

louis030195 avatar louis030195 commented on July 17, 2024

not clearly written in docs that perplexity provider does not support object/json mode

from ai.

louis030195 avatar louis030195 commented on July 17, 2024

assuming it's a bottleneck on their api side?

from ai.

louis030195 avatar louis030195 commented on July 17, 2024

got an answer from them
image

from ai.

dmladenov-dev avatar dmladenov-dev commented on July 17, 2024

cause: ZodError: [
{
"code": "invalid_type",
"expected": "string",
"received": "null",
"path": [
"knowledge",
"certificates",
0,
"url"
],
"message": "Expected string, received null"
},

Got the same error, how can I correct it. Im fine with getting null 

from ai.

lgrammel avatar lgrammel commented on July 17, 2024

@dmladenov-dev it looks like your zod schema needs .string().nullish()

from ai.

dmladenov-dev avatar dmladenov-dev commented on July 17, 2024

@dmladenov-dev it looks like your zod schema needs .string().nullish()

Of course 😅. My mistake, thanks for the quick reply!

from ai.

dmladenov-dev avatar dmladenov-dev commented on July 17, 2024

@lgrammel Okay it worked with the nullish but in fact I do need it to be not null. An empty string is what I would like to get as a result if it does not have some information. Is there any way I can enforce that in some way other than the prompt, because there it is not consistent

from ai.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.