langchaingo icon indicating copy to clipboard operation
langchaingo copied to clipboard

openai: implementing support for NVidia

Open devalexandre opened this issue 1 year ago • 2 comments

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).
  • [x] Describes the source of new concepts.
  • [x] References existing implementations as appropriate.
  • [x] Contains test coverage for new functions.
  • [x] Passes all golangci-lint checks.

Reference a Issue #718

devalexandre avatar Mar 29 '24 22:03 devalexandre

I'm a little skeptical about adding APITypeNvidia as I feel a different BaseURL should be sufficient in most cases.

I thought about this possibility, but if you just use With BaseUrl , it may work for integration, but the URL for embeddings is different, hence the addition of APIType, otherwise we would have to check if there is the word nvidia in the URL and change the URL for embeddings

devalexandre avatar Apr 01 '24 00:04 devalexandre

I just landed #733 and added an example -- can you rebase this?

I'm a little skeptical about adding APITypeNvidia as I feel a different BaseURL should be sufficient in most cases.

so Nvidia have a embedding URL different of base URL, because it I create a new type

devalexandre avatar Apr 23 '24 12:04 devalexandre

Yeah still not open to doing this in such a vendor specific manner, I'd be open to a WIth* Option that adds this but I don't think we should hard code more vendors as that will cause a maintenance burden.

okay, how we can use using olny url I'll create a embedding for Nvidia

devalexandre avatar May 10 '24 13:05 devalexandre