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

Empty response when the query includes a url #30

Open
nerblock opened this issue Jul 14, 2023 · 0 comments
Open

Empty response when the query includes a url #30

nerblock opened this issue Jul 14, 2023 · 0 comments

Comments

@nerblock
Copy link

The response is empty when the query includes a link to a webpage. For example try this query:

Can you summarize this article for me? https://blog.google/technology/ai/code-with-bard/

This happens because resData[3] contains an empty string. To get the actual response text the ask method needs to be modified to return resData[1]:

    async ask(prompt, conversationId) {
        let resData = await this.send(prompt, conversationId);
        return resData[3].length > 0 ? resData[3] : resData[1];
    }
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