langchaingo icon indicating copy to clipboard operation
langchaingo copied to clipboard

examples/ollama_functions_example: improve system message for better response

Open shmsr opened this issue 1 year ago • 3 comments

For llama3, the example seemed to work but for some other models like qwen2 and friends, it was not working properly. I faced issues where getCurrentWeather tool worked but not the finalResponse tool. With these changes, I can get the desired behavior.

PR Checklist

  • [x] Read the Contributing documentation.
  • [x] Read the Code of conduct documentation.
  • [x] Name your Pull Request title clearly, concisely, and prefixed with the name of the primarily affected package you changed according to Good commit messages (such as memory: add interfaces for X, Y or util: add whizzbang helpers).
  • [x] Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • [x] Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. Fixes #123).
  • [ ] Describes the source of new concepts.
  • [ ] References existing implementations as appropriate.
  • [ ] Contains test coverage for new functions.
  • [x] Passes all golangci-lint checks.

shmsr avatar Jul 08 '24 19:07 shmsr

@corani Can you PTAL?

shmsr avatar Jul 25 '24 07:07 shmsr

friendly ping

shmsr avatar Sep 13 '24 15:09 shmsr

Looks fine to me, but it's up to @tmc to decide 😉

corani avatar Sep 16 '24 02:09 corani