langchain-ai / langchain-google

MIT License
117 stars 147 forks source link

langchain-google: added _strip_erroneous_characters with trailing newline removal #598

Open aaronbriel opened 1 week ago

aaronbriel commented 1 week ago

PR Description

Renamed _strip_erroneous_spaces to _strip_erroneous_characters and added trailing newline removal, added unit tests for function.

Relevant issues

24648

Type

๐Ÿ› Bug Fix ๐Ÿงน Refactoring โœ… Test

Changes(optional)

Testing(optional)

make test

77 passed, 6 warnings in 0.82s

Note(optional)

lkuligin commented 2 days ago

PALM is going to be deprecated, do we really need this one?

lkuligin commented 2 days ago

actually, if your original issue was with gemini-1.5 model, I'm not sure this PR will fix it.