langchain icon indicating copy to clipboard operation
langchain copied to clipboard

Add Generation.text error log

Open dinggege1024 opened this issue 1 year ago • 5 comments

you could trace this background https://github.com/hwchase17/langchain/issues/3654

dinggege1024 avatar Apr 27 '23 15:04 dinggege1024

@hwchase17 Please review this pull request and provide some suggestions, tks

dinggege1024 avatar Apr 27 '23 16:04 dinggege1024

I'd prefer to either/both:

  • Handle this upstream -> if the response of _generation isn't a string, then the typing is wrong and we should fix that in the LLM wrapper
  • Handle this in the Generation model itself -> if the validation error message isn't helpful then we can do so there

Are there examples where this is occuring?

vowelparrot avatar Apr 27 '23 17:04 vowelparrot

I'd prefer to either/both:

  • Handle this upstream -> if the response of _generation isn't a string, then the typing is wrong and we should fix that in the LLM wrapper
  • Handle this in the Generation model itself -> if the validation error message isn't helpful then we can do so there

Are there examples where this is occuring?

image I used LLM with our api, i goes wrong with response in above pic. Before debug, i can not understand what happen.

-- Handle this in the Generation model itself -> if the validation error message isn't helpful then we can do so there Updated pr, Is the solution mentioned above? Tks

@vowelparrot

dinggege1024 avatar Apr 28 '23 00:04 dinggege1024

agree with @vowelparrot this probably isnt the best place to handle it

I used LLM with our api, i goes wrong with response in above pic theres probably some misconfiguration of your LLM wrapper going on, i would fix that

hwchase17 avatar Apr 29 '23 03:04 hwchase17

agree with @vowelparrot this probably isnt the best place to handle it

I used LLM with our api, i goes wrong with response in above pic theres probably some misconfiguration of your LLM wrapper going on, i would fix that

Thks for reply, if fixed up please show me the way~

dinggege1024 avatar Apr 29 '23 11:04 dinggege1024

stale, closing but let me know if you're still seeing issues!

baskaryan avatar Aug 11 '23 20:08 baskaryan