autogen
autogen copied to clipboard
[.Net] Support raw-data in ImageMessage
Why are these changes needed?
This PR supports data url for ImageMessage which will be sent to ChatCompletion API's (Azure OpenAi and Open AI )
- Add
BinaryDatatoImageMessageand update callers that use Uri to considerBinaryDatawhen necessary. - Introduce a simple example of the usage for
ImageMessageusing theBinaryDataconstructor overload. - Update unit tests to reflect the change.
Related issue number
Closes #1893
Checks
- [ ] I've included any doc changes needed for https://microsoft.github.io/autogen/. See https://microsoft.github.io/autogen/docs/Contribute#documentation to build and test documentation locally.
- [x] I've added tests (if relevant) corresponding to the changes introduced in this PR.
- [x] I've made sure all auto checks have passed.
⚠️ GitGuardian has uncovered 40 secrets following the scan of your pull request.
Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.
🔎 Detected hardcoded secrets in your pull request
| GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
|---|---|---|---|---|---|
| 10404693 | Triggered | Generic High Entropy Secret | b0f1693eb1adfb7e04733980d48d1250bda431b2 | test/oai/test_utils.py | View secret |
| 10404693 | Triggered | Generic High Entropy Secret | 3f7c6481a6caf845b057c2250d3dd1ae356c73c0 | test/oai/test_utils.py | View secret |
| 10404693 | Triggered | Generic High Entropy Secret | 58e27f244c88880a4a8f1332a17e5d9b42dc0a31 | test/oai/test_utils.py | View secret |
| 10404693 | Triggered | Generic High Entropy Secret | 4d24b68fa0ca8cd5824faa8ae93e5941d076c357 | test/oai/test_utils.py | View secret |
| 10404693 | Triggered | Generic High Entropy Secret | 5903c9c1e62f60f11150a28b6200d63e300c05ea | test/oai/test_utils.py | View secret |
| 10404662 | Triggered | Generic CLI Secret | d58f2c82fb0107c5339791de6fb62004c6e3b257 | .github/workflows/dotnet-release.yml | View secret |
| 10404694 | Triggered | Generic High Entropy Secret | 4d24b68fa0ca8cd5824faa8ae93e5941d076c357 | test/oai/test_utils.py | View secret |
| 10404694 | Triggered | Generic High Entropy Secret | 58e27f244c88880a4a8f1332a17e5d9b42dc0a31 | test/oai/test_utils.py | View secret |
| 10404694 | Triggered | Generic High Entropy Secret | 3f7c6481a6caf845b057c2250d3dd1ae356c73c0 | test/oai/test_utils.py | View secret |
| 10404694 | Triggered | Generic High Entropy Secret | b0f1693eb1adfb7e04733980d48d1250bda431b2 | test/oai/test_utils.py | View secret |
| 10404694 | Triggered | Generic High Entropy Secret | 5903c9c1e62f60f11150a28b6200d63e300c05ea | test/oai/test_utils.py | View secret |
| 10404695 | Triggered | Generic High Entropy Secret | 5903c9c1e62f60f11150a28b6200d63e300c05ea | test/oai/test_utils.py | View secret |
| 10404695 | Triggered | Generic High Entropy Secret | 58e27f244c88880a4a8f1332a17e5d9b42dc0a31 | test/oai/test_utils.py | View secret |
| 10404695 | Triggered | Generic High Entropy Secret | 3f7c6481a6caf845b057c2250d3dd1ae356c73c0 | test/oai/test_utils.py | View secret |
| 10404695 | Triggered | Generic High Entropy Secret | 4d24b68fa0ca8cd5824faa8ae93e5941d076c357 | test/oai/test_utils.py | View secret |
| 10404695 | Triggered | Generic High Entropy Secret | b0f1693eb1adfb7e04733980d48d1250bda431b2 | test/oai/test_utils.py | View secret |
| 10404696 | Triggered | Generic High Entropy Secret | 4d24b68fa0ca8cd5824faa8ae93e5941d076c357 | test/oai/test_utils.py | View secret |
| 10404696 | Triggered | Generic High Entropy Secret | 5903c9c1e62f60f11150a28b6200d63e300c05ea | test/oai/test_utils.py | View secret |
| 10404696 | Triggered | Generic High Entropy Secret | 58e27f244c88880a4a8f1332a17e5d9b42dc0a31 | test/oai/test_utils.py | View secret |
| 10404696 | Triggered | Generic High Entropy Secret | 3f7c6481a6caf845b057c2250d3dd1ae356c73c0 | test/oai/test_utils.py | View secret |
| 10404696 | Triggered | Generic High Entropy Secret | b0f1693eb1adfb7e04733980d48d1250bda431b2 | test/oai/test_utils.py | View secret |
| 10404662 | Triggered | Generic CLI Secret | 43892f0f195ccf8ef0d44bd87146643f021fd4d8 | .github/workflows/dotnet-build.yml | View secret |
| 10404662 | Triggered | Generic CLI Secret | 01b15c48558cc4c7d25727e478382317edbfbdcc | .github/workflows/dotnet-build.yml | View secret |
| 10404662 | Triggered | Generic CLI Secret | 43892f0f195ccf8ef0d44bd87146643f021fd4d8 | .github/workflows/dotnet-build.yml | View secret |
| 10404662 | Triggered | Generic CLI Secret | 4bb63f5d4fb3b9fa8ee0c030fbb386898056a594 | .github/workflows/dotnet-build.yml | View secret |
| 10404662 | Triggered | Generic CLI Secret | aa96c441a8b16ec48166585a94ce099772cabf46 | .github/workflows/dotnet-build.yml | View secret |
| 10404662 | Triggered | Generic CLI Secret | 43892f0f195ccf8ef0d44bd87146643f021fd4d8 | .github/workflows/dotnet-build.yml | View secret |
| 10404662 | Triggered | Generic CLI Secret | 01b15c48558cc4c7d25727e478382317edbfbdcc | .github/workflows/dotnet-build.yml | View secret |
| 10404662 | Triggered | Generic CLI Secret | 01b15c48558cc4c7d25727e478382317edbfbdcc | .github/workflows/dotnet-build.yml | View secret |
| 10404662 | Triggered | Generic CLI Secret | 2cf076890aec7db8200afc0a0f9435ed66176df8 | .github/workflows/dotnet-build.yml | View secret |
| 10404662 | Triggered | Generic CLI Secret | aa96c441a8b16ec48166585a94ce099772cabf46 | .github/workflows/dotnet-build.yml | View secret |
| 10404662 | Triggered | Generic CLI Secret | 2cf076890aec7db8200afc0a0f9435ed66176df8 | .github/workflows/dotnet-build.yml | View secret |
| 10404662 | Triggered | Generic CLI Secret | 1ca29af13d0f2bfa48d70f67522d615b34108794 | .github/workflows/dotnet-build.yml | View secret |
| 10404662 | Triggered | Generic CLI Secret | 4bb63f5d4fb3b9fa8ee0c030fbb386898056a594 | .github/workflows/dotnet-build.yml | View secret |
| 10404662 | Triggered | Generic CLI Secret | 4bb63f5d4fb3b9fa8ee0c030fbb386898056a594 | .github/workflows/dotnet-build.yml | View secret |
| 10404662 | Triggered | Generic CLI Secret | 43892f0f195ccf8ef0d44bd87146643f021fd4d8 | .github/workflows/dotnet-build.yml | View secret |
| 10404662 | Triggered | Generic CLI Secret | 01b15c48558cc4c7d25727e478382317edbfbdcc | .github/workflows/dotnet-build.yml | View secret |
| 10404662 | Triggered | Generic CLI Secret | 4bb63f5d4fb3b9fa8ee0c030fbb386898056a594 | .github/workflows/dotnet-build.yml | View secret |
| 10404662 | Triggered | Generic CLI Secret | 1ca29af13d0f2bfa48d70f67522d615b34108794 | .github/workflows/dotnet-build.yml | View secret |
| 10404662 | Triggered | Generic CLI Secret | 0369ec795539ee21acd0c7a2179054e755562128 | .github/workflows/dotnet-release.yml | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secrets safely. Learn here the best practices.
- Revoke and rotate these secrets.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.