-
Notifications
You must be signed in to change notification settings - Fork 719
UN-4224 [FIX] Stop sending temperature to GPT-6 models on Bedrock, OpenAI and Azure OpenAI #2310
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
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
41adae5
UN-4224 [FIX] Stop sending temperature to GPT-6 models on Bedrock, Op…
praveen-formido e8d0748
UN-4224 [FIX] Keep the Azure GPT-6 strip when callers pass temperatur…
praveen-formido ca9096c
UN-4224 [FIX] Upgrade LiteLLM to 1.104.0 and the boto3 / fsspec stora…
praveen-formido 772df01
UN-4224 [FIX] Re-add Content-MD5 on S3 DeleteObjects for MinIO older …
praveen-formido 45b7680
Merge remote-tracking branch 'origin/main' into UN-4224-gpt6-temperat…
praveen-formido 8ee69b5
UN-4224 [FIX] Keep one copy of the DeleteObjects Content-MD5 hook
praveen-formido 06ec4c9
UN-4224 [FIX] Address review: keep the storage wire format stable, co…
praveen-formido b0fa1ed
UN-4224 [FIX] Install s3fs and gcsfs in the sdk1 test group
praveen-formido 24645ec
Merge branch 'main' into UN-4224-gpt6-temperature-strip
muhammad-ali-e File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
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
64 changes: 64 additions & 0 deletions
64
unstract/connectors/tests/filesystems/test_storage_compat_wiring.py
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| """The connectors load sdk1's storage_compat on their own (UN-4224). | ||
|
|
||
| Each probe runs in a fresh interpreter and imports only the connector module, | ||
| so nothing in this test process can satisfy it. Deleting the import from the | ||
| connector must fail these tests. | ||
| """ | ||
|
|
||
| import os | ||
| import subprocess | ||
| import sys | ||
|
|
||
| from unstract.connectors.filesystems.minio.minio import MinioFS | ||
| from unstract.connectors.filesystems.ucs.ucs import UnstractCloudStorage | ||
|
|
||
| _EXPECTED_CHECKSUM_CONFIG = { | ||
| "request_checksum_calculation": "when_required", | ||
| "response_checksum_validation": "when_required", | ||
| } | ||
|
|
||
|
|
||
| def _run_probe(probe: str) -> None: | ||
| env = { | ||
| k: v for k, v in os.environ.items() if k != "GCSFS_EXPERIMENTAL_ZB_HNS_SUPPORT" | ||
| } | ||
| # The connectors package is on the path via pytest's `pythonpath`, which a | ||
| # child interpreter does not inherit. | ||
| env["PYTHONPATH"] = os.pathsep.join(p for p in sys.path if p) | ||
| result = subprocess.run( | ||
| [sys.executable, "-c", probe], env=env, capture_output=True, text=True | ||
| ) | ||
| assert result.returncode == 0, result.stderr[-2000:] | ||
|
|
||
|
|
||
| def test_minio_connector_import_registers_delete_objects_md5() -> None: | ||
| _run_probe( | ||
| "import unstract.connectors.filesystems.minio.minio\n" | ||
| "import botocore.handlers\n" | ||
| "names = [h[1].__name__ for h in botocore.handlers.BUILTIN_HANDLERS\n" | ||
| " if h[0] == 'before-call.s3.DeleteObjects']\n" | ||
| "assert 'add_content_md5' in names, names\n" | ||
| ) | ||
|
|
||
|
|
||
| def test_gcs_connector_import_keeps_core_gcsfs() -> None: | ||
| _run_probe( | ||
| "import unstract.connectors.filesystems.google_cloud_storage." | ||
| "google_cloud_storage\n" | ||
| "import gcsfs\n" | ||
| "assert gcsfs.GCSFileSystem.__name__ == 'GCSFileSystem', gcsfs.GCSFileSystem\n" | ||
| ) | ||
|
|
||
|
|
||
| def test_minio_and_ucs_send_plain_uploads() -> None: | ||
| # No aws-chunked uploads: UCS is GCS's S3 interop API, MinIO may sit behind | ||
| # TLS; both get the payload-signed requests boto3 1.34 sent. | ||
| settings = { | ||
| "key": "k", | ||
| "secret": "s", | ||
| "endpoint_url": "https://storage.example", | ||
| "bucket": "b", | ||
| } | ||
| for fs_class in (MinioFS, UnstractCloudStorage): | ||
| s3 = fs_class(settings).s3 | ||
| assert s3.config_kwargs == _EXPECTED_CHECKSUM_CONFIG, fs_class.__name__ |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.