Skip to content

llms/openai: add store field support for metadata requests#1485

Open
pedro-a-n-moreira wants to merge 3 commits intotmc:mainfrom
pedro-a-n-moreira:FIX/ISSUE/1484
Open

llms/openai: add store field support for metadata requests#1485
pedro-a-n-moreira wants to merge 3 commits intotmc:mainfrom
pedro-a-n-moreira:FIX/ISSUE/1484

Conversation

@pedro-a-n-moreira
Copy link
Copy Markdown

Fixes issue #1484 where llms.WithMetadata causes HTTP 400 from OpenAI: 'The metadata parameter is only allowed when store is enabled'

  • Add Store bool field to ChatRequest struct
  • Set Store: true automatically when metadata is provided
  • Add tests for Store field JSON serialization
  • Add test for WithMetadata integration with Store field

PR Checklist

  • Read the Contributing documentation.
  • Read the Code of conduct documentation.
  • 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).
  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • 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.
  • Passes all golangci-lint checks.

Fixes issue where llms.WithMetadata causes HTTP 400 from OpenAI:
'The metadata parameter is only allowed when store is enabled'

- Add Store bool field to ChatRequest struct
- Set Store: true automatically when metadata is provided
- Add tests for Store field JSON serialization
- Add test for WithMetadata integration with Store field
Fixes tmc#1484

- Add Store bool field to ChatRequest struct
- Set Store: true automatically when metadata is provided
- Add tests for Store field JSON serialization
- Add test for WithMetadata integration with Store field
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant