Closed orenagiv closed 9 months ago
Looks like there is some confusion in the http
package about the expected/default decode logic. I assumed that utf-8
was the default, but I suppose that is not the case.
@orenagiv this has been taken care of in #44 and successfully published to openapi_spec
(v0.7.8). @davidmigloz should be able to integrate in to LangChain Dart soon.
@walsha2 we need to recreate the other clients as well (pinecone
on your side and chromadb
on my side).
chromadb
recreated in:
Thanks @davidmigloz @walsha2 ! Works great! 👍
@walsha2 we need to recreate the other clients as well (
pinecone
on your side andchromadb
on my side).
Hey, While using the LangChain.dart package, which uses the
openapi_spec
package, I've noticed that if the OpenAI response includes characters in Hebrew or other languages with special characters - it results with "gibberish".This is most probably due to
client.dart
> lines 883 and 896, wherejson.decode
is doneover r.body
: https://github.com/search?q=repo%3Atazatechnology%2Fopenapi_spec+json.decode%28r.body%29&type=codeIt seems that due to this Dart issue: https://github.com/dart-lang/http/issues/789
The
json.decode
should be done withutf8.decode
over ther.bodyBytes
, in order to properly handle the UTF-8 chars:I've manually manipulated the generated
client.dart
file - and it resolved the problem. However, unfortunately, due to lack of time I'm unable to test this properly and submit a Pull Request... I hope the maintainers will have to take a look soon.