-
Notifications
You must be signed in to change notification settings - Fork 468
fix(openai): allow tokens or token arrays as input for Embeddings endpoint #5890
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1a188d9 to
f590523
Compare
emmettbutler
previously approved these changes
May 18, 2023
mabdinur
reviewed
May 18, 2023
releasenotes/notes/fix-openai-embeddings-input-7feb1198fabac31b.yaml
Outdated
Show resolved
Hide resolved
mabdinur
approved these changes
May 18, 2023
Yun-Kim
added a commit
that referenced
this pull request
May 18, 2023
…point (#5890) Fixes #5884. This PR adds handling for non-string request input params for the `Embeddings.create()` method. This API method accepts strings, array of strings, as well as token arrays (list of ints) and arrays of token arrays (list of list of ints), but the previous implementation only accounted for strings and array of strings. Token arrays or arrays of token arrays being passed in as arguments would then cause errors as the traced request handler for the Embeddings endpoint did not account for non-string types. ## Checklist - [x] Change(s) are motivated and described in the PR description. - [x] Testing strategy is described if automated tests are not included in the PR. - [x] Risk is outlined (performance impact, potential for breakage, maintainability, etc). - [x] Change is maintainable (easy to change, telemetry, documentation). - [x] [Library release note guidelines](https://ddtrace.readthedocs.io/en/stable/contributing.html#Release-Note-Guidelines) are followed. - [x] Documentation is included (in-code, generated user docs, [public corp docs](https://github.com/DataDog/documentation/)). - [x] OPTIONAL: PR description includes explicit acknowledgement of the performance implications of the change as reported in the benchmarks PR comment. ## Reviewer Checklist - [x] Title is accurate. - [x] No unnecessary changes are introduced. - [x] Description motivates each change. - [x] Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes unless absolutely necessary. - [x] Testing strategy adequately addresses listed risk(s). - [x] Change is maintainable (easy to change, telemetry, documentation). - [x] Release note makes sense to a user of the library. - [x] Reviewer has explicitly acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment.
15 tasks
Yun-Kim
added a commit
that referenced
this pull request
May 18, 2023
…point (#5890) Fixes #5884. This PR adds handling for non-string request input params for the `Embeddings.create()` method. This API method accepts strings, array of strings, as well as token arrays (list of ints) and arrays of token arrays (list of list of ints), but the previous implementation only accounted for strings and array of strings. Token arrays or arrays of token arrays being passed in as arguments would then cause errors as the traced request handler for the Embeddings endpoint did not account for non-string types. ## Checklist - [x] Change(s) are motivated and described in the PR description. - [x] Testing strategy is described if automated tests are not included in the PR. - [x] Risk is outlined (performance impact, potential for breakage, maintainability, etc). - [x] Change is maintainable (easy to change, telemetry, documentation). - [x] [Library release note guidelines](https://ddtrace.readthedocs.io/en/stable/contributing.html#Release-Note-Guidelines) are followed. - [x] Documentation is included (in-code, generated user docs, [public corp docs](https://github.com/DataDog/documentation/)). - [x] OPTIONAL: PR description includes explicit acknowledgement of the performance implications of the change as reported in the benchmarks PR comment. ## Reviewer Checklist - [x] Title is accurate. - [x] No unnecessary changes are introduced. - [x] Description motivates each change. - [x] Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes unless absolutely necessary. - [x] Testing strategy adequately addresses listed risk(s). - [x] Change is maintainable (easy to change, telemetry, documentation). - [x] Release note makes sense to a user of the library. - [x] Reviewer has explicitly acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment.
15 tasks
mabdinur
added a commit
that referenced
this pull request
May 19, 2023
… to 1.14] (#5910) Backports #5890 to 1.14. Fixes #5884. This PR adds handling for non-string request input params for the `Embeddings.create()` method. This API method accepts strings, array of strings, as well as token arrays (list of ints) and arrays of token arrays (list of list of ints), but the previous implementation only accounted for strings and array of strings. Token arrays or arrays of token arrays being passed in as arguments would then cause errors as the traced request handler for the Embeddings endpoint did not account for non-string types. ## Checklist - [x] Change(s) are motivated and described in the PR description. - [x] Testing strategy is described if automated tests are not included in the PR. - [x] Risk is outlined (performance impact, potential for breakage, maintainability, etc). - [x] Change is maintainable (easy to change, telemetry, documentation). - [x] [Library release note guidelines](https://ddtrace.readthedocs.io/en/stable/contributing.html#Release-Note-Guidelines) are followed. - [x] Documentation is included (in-code, generated user docs, [public corp docs](https://github.com/DataDog/documentation/)). - [x] OPTIONAL: PR description includes explicit acknowledgement of the performance implications of the change as reported in the benchmarks PR comment. ## Reviewer Checklist - [x] Title is accurate. - [x] No unnecessary changes are introduced. - [x] Description motivates each change. - [x] Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes unless absolutely necessary. - [x] Testing strategy adequately addresses listed risk(s). - [x] Change is maintainable (easy to change, telemetry, documentation). - [x] Release note makes sense to a user of the library. - [x] Reviewer has explicitly acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment. Co-authored-by: Munir Abdinur <munir.abdinur@datadoghq.com>
Yun-Kim
added a commit
that referenced
this pull request
May 19, 2023
… to 1.13] (#5909) Backports #5890 to 1.13. Fixes #5884. This PR adds handling for non-string request input params for the `Embeddings.create()` method. This API method accepts strings, array of strings, as well as token arrays (list of ints) and arrays of token arrays (list of list of ints), but the previous implementation only accounted for strings and array of strings. Token arrays or arrays of token arrays being passed in as arguments would then cause errors as the traced request handler for the Embeddings endpoint did not account for non-string types. ## Checklist - [x] Change(s) are motivated and described in the PR description. - [x] Testing strategy is described if automated tests are not included in the PR. - [x] Risk is outlined (performance impact, potential for breakage, maintainability, etc). - [x] Change is maintainable (easy to change, telemetry, documentation). - [x] [Library release note guidelines](https://ddtrace.readthedocs.io/en/stable/contributing.html#Release-Note-Guidelines) are followed. - [x] Documentation is included (in-code, generated user docs, [public corp docs](https://github.com/DataDog/documentation/)). - [x] OPTIONAL: PR description includes explicit acknowledgement of the performance implications of the change as reported in the benchmarks PR comment. ## Reviewer Checklist - [x] Title is accurate. - [x] No unnecessary changes are introduced. - [x] Description motivates each change. - [x] Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes unless absolutely necessary. - [x] Testing strategy adequately addresses listed risk(s). - [x] Change is maintainable (easy to change, telemetry, documentation). - [x] Release note makes sense to a user of the library. - [x] Reviewer has explicitly acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #5884.
This PR adds handling for non-string request input params for the
Embeddings.create()method. This API method accepts strings, array of strings, as well as token arrays (list of ints) and arrays of token arrays (list of list of ints), but the previous implementation only accounted for strings and array of strings. Token arrays or arrays of token arrays being passed in as arguments would then cause errors as the traced request handler for the Embeddings endpoint did not account for non-string types.Checklist
Reviewer Checklist