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

add better error message when the tableinfo method return too much info #662

Merged

Conversation

MaximeThoonsen
Copy link

No description provided.

@vercel
Copy link

vercel bot commented Apr 7, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
langchainjs-docs ✅ Ready (Inspect) Visit Preview Apr 13, 2023 2:03pm

return;
}
const promptTemplate = this.prompt.template;
const stringWeSend = `${inputText}${promptTemplate}${tableinfo}`;
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's an easy to understand approximation of the final string

@MaximeThoonsen
Copy link
Author

I did this PR because the current error message (a 400 from the API) is not really helping to debug and I was asked for help to debug this kind of error on discord.
Screenshot from 2023-04-07 14-58-07

The python error message is a bit better but we could also back port this in the python version. ping @hwchase17

Screenshot from 2023-04-07 14-53-05

@MaximeThoonsen
Copy link
Author

The new error message looks like this.
Screenshot from 2023-04-07 15-48-23

Copy link
Collaborator

@hwchase17 hwchase17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks pretty good to me! thanks for the improvement

…fo to be passed to openai and it reaches the token limit
@MaximeThoonsen MaximeThoonsen force-pushed the add-token-limit-sqlDatabasechain branch from 939544e to 7cb9b88 Compare April 7, 2023 16:27
@nfcampos nfcampos added the lgtm PRs that are ready to be merged as-is label Apr 13, 2023
@nfcampos
Copy link
Collaborator

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm PRs that are ready to be merged as-is
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants