-
Notifications
You must be signed in to change notification settings - Fork 5
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
fix: added user agent with more details #42
Merged
Merged
Conversation
This file contains 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
Contributor
asafgardin
commented
Jan 29, 2024
- OS
- Python Version
etang-ai21
reviewed
Jan 29, 2024
ai21/ai21_http_client.py
Outdated
@@ -60,7 +61,9 @@ def _init_http_client(self, http_client: Optional[HttpClient], headers: Dict[str | |||
return http_client | |||
|
|||
def _build_user_agent(self) -> str: | |||
user_agent = f"ai21 studio SDK {VERSION}" | |||
user_agent = ( | |||
f"ai21 studio SDK {VERSION} Python {platform.python_version()} Operating System {platform.platform()}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AI21
etang-ai21
reviewed
Jan 29, 2024
@@ -7,16 +8,20 @@ | |||
from ai21.http_client import HttpClient | |||
from ai21.version import VERSION | |||
|
|||
_EXPECTED_USER_AGENT = ( | |||
f"ai21 studio SDK {VERSION} Python {platform.python_version()} Operating System {platform.platform()}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AI21
etang-ai21
approved these changes
Jan 29, 2024
asafgardin
added a commit
that referenced
this pull request
Jan 31, 2024
* ci: Change main proj name (#22) * ci: precommit * fix: version name * ci: Added rc pipeline for semantic release * ci: pypi api keys * ci: Added rc pipeline for semantic release * ci: pypi api keys * fix: readme * chore(release): v2.0.0-rc.4 [skip ci] * docs: README.md (#23) * ci: updated precommit hooks * docs: more readme updates * docs: removed extra lines * fix: rename * docs: readme * docs: full readme * docs: badges * ci: commitizen version * revert: via * docs: Readme migration (#24) * docs: instance text * docs: client instance explanation * ci: Remove python 3_7 support (#25) * ci: python 3.8 >= support * ci: unittests * test: dummy test * docs: Readme additions (#27) * fix: removed unnecessary url env var * fix: README.md CR * test: Unittests for 2.0.0 (#28) * test: get_tokenizer tests * fix: cases * test: Added some unittests to resources * fix: rename var * test: Added ai21 studio client tsts * fix: rename files * fix: Added types * test: added test to http * fix: removed unnecessary auth param * test: Added tests * test: Added sagemaker * test: Created a single session per instance * ci: removed unnecessary action * fix: Feedback fixes (#29) * test: get_tokenizer tests * fix: cases * test: Added some unittests to resources * fix: rename var * test: Added ai21 studio client tsts * fix: rename files * fix: Added types * test: added test to http * fix: removed unnecessary auth param * test: Added tests * test: Added sagemaker * test: Created a single session per instance * ci: removed unnecessary action * fix: errors * fix: error renames * fix: rename upload * fix: rename type * fix: rename variable * fix: removed experimental * test: fixed * test: Added some unittests to resources * test: Added ai21 studio client tsts * fix: rename files * fix: Added types * test: added test to http * fix: removed unnecessary auth param * test: Added tests * test: Added sagemaker * test: Created a single session per instance * fix: errors * fix: error renames * fix: rename upload * fix: rename type * fix: rename variable * fix: removed experimental * test: fixed * chore(release): v2.0.0-rc.5 [skip ci] * refactor: Add enums (#30) * refactor: answer enum * refactor: answer - mode enum * refactor: moved imports * refactor: Added enums to chat requests/response * refactor: Added enums to completion requests/response * fix: imports * refactor: Added embed types enum * refactor: Added correction type enum * refactor: Added improvement type enum * refactor: Added enums to paraphrase and library answer * refactor: Added enums to segmentation * refactor: Added enums to summary * refactor: Added enums to summary by segment * fix: test * fix: bump version * chore(release): v2.0.0-rc.6 [skip ci] * fix: Restructure packages (#31) * refactor: moved classes to models package * refactor: moved responses = to models package * refactor: moved resources to common package * refactor: chat message rename * refactor: init * fix: imports * refactor: added more to imports * chore(release): v2.0.0-rc.7 [skip ci] * fix: Added env config class to init (#32) * fix: Added py.typed (#33) * fix: Pass env config to client ctor (#34) * fix: removed application and organization * fix: tests * fix: env vars to http client in sagemaker (#35) * fix: env vars to http * fix: env vars to http * chore(release): v2.0.0-rc.8 [skip ci] * fix: Removed name parameter from chat message (#36) * fix: removed name parameter from chat message * fix: imports in integration tests * chore(release): v2.0.0-rc.9 [skip ci] * fix: chat parameters (#39) * fix: parameters for chat create * fix: imports * chore(release): v2.0.0-rc.10 [skip ci] * fix: top_k_returns to top_k_return (#40) * chore(release): v2.0.0-rc.11 [skip ci] * fix: added user agent with more details (#42) * test: added user agent with more details * test: changed to capital * test: Removed class into single tests * ci: Add rc branch prefix trigger for integration tests (#43) * ci: rc branch trigger for integration test * fix: wrapped in quotes * fix: aws tests (#44) * ci: rc branch trigger for integration test * fix: wrapped in quotes * fix: AWS tests * test: ci * fix: AWS tests * test: ci * fix: Removed testing pattern for tests * fix: Integration tests (#41) * fix: types * test: Added some integration tests * test: improvements * test: test_paraphrase.py * fix: doc * fix: removed unused comment * test: test_summarize.py * test: Added tests for test_summarize_by_segment.py * test: test_segmentation.py * fix: file id in library response * fix: example for library * ci: Add rc branch prefix trigger for integration tests (#43) * ci: rc branch trigger for integration test * fix: wrapped in quotes * fix: types * test: Added some integration tests * test: improvements * test: test_paraphrase.py * fix: doc * fix: removed unused comment * test: test_summarize.py * test: Added tests for test_summarize_by_segment.py * test: test_segmentation.py * fix: file id in library response * fix: example for library * docs: docstrings * fix: question * fix: CR * test: Added tests to segment type in embed * chore(deps-dev): bump jinja2 from 3.1.2 to 3.1.3 (#38) Bumps [jinja2](https://github.com/pallets/jinja) from 3.1.2 to 3.1.3. - [Release notes](https://github.com/pallets/jinja/releases) - [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst) - [Commits](pallets/jinja@3.1.2...3.1.3) --- updated-dependencies: - dependency-name: jinja2 dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: asafgardin <[email protected]> * chore(deps-dev): bump gitpython from 3.1.40 to 3.1.41 (#37) Bumps [gitpython](https://github.com/gitpython-developers/GitPython) from 3.1.40 to 3.1.41. - [Release notes](https://github.com/gitpython-developers/GitPython/releases) - [Changelog](https://github.com/gitpython-developers/GitPython/blob/main/CHANGES) - [Commits](gitpython-developers/GitPython@3.1.40...3.1.41) --- updated-dependencies: - dependency-name: gitpython dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: asafgardin <[email protected]> * chore(deps): bump actions/upload-artifact from 3 to 4 (#21) Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](actions/upload-artifact@v3...v4) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: asafgardin <[email protected]> * chore(deps): bump pypa/gh-action-pypi-publish from 1.4.2 to 1.8.11 (#20) Bumps [pypa/gh-action-pypi-publish](https://github.com/pypa/gh-action-pypi-publish) from 1.4.2 to 1.8.11. - [Release notes](https://github.com/pypa/gh-action-pypi-publish/releases) - [Commits](pypa/gh-action-pypi-publish@27b3170...2f6f737) --- updated-dependencies: - dependency-name: pypa/gh-action-pypi-publish dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: asafgardin <[email protected]> * chore(deps): bump actions/setup-python from 4 to 5 (#19) Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4 to 5. - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](actions/setup-python@v4...v5) --- updated-dependencies: - dependency-name: actions/setup-python dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: asafgardin <[email protected]> * chore(deps): bump amannn/action-semantic-pull-request (#2) Bumps [amannn/action-semantic-pull-request](https://github.com/amannn/action-semantic-pull-request) from 5.0.2 to 5.4.0. - [Release notes](https://github.com/amannn/action-semantic-pull-request/releases) - [Changelog](https://github.com/amannn/action-semantic-pull-request/blob/main/CHANGELOG.md) - [Commits](amannn/action-semantic-pull-request@v5.0.2...v5.4.0) --- updated-dependencies: - dependency-name: amannn/action-semantic-pull-request dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: asafgardin <[email protected]> * test: Added tests for library (#45) * test: Added tests for library * fix: CR * chore(release): v2.0.0-rc.12 [skip ci] * fix: Removed unnecessary pre commit hook * fix: Removed autouse * fix: CR * docs: CONTRIBUTING.md * docs: LICENSE * fix: removed license * test: Added some more unittests --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: github-actions <[email protected]> Co-authored-by: etang <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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.