Skip to content
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

Amazon Bedrock Client for AutoGen #3232

Merged
merged 21 commits into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
5937da3
intial commit for aws-bedrock
Hk669 Jul 27, 2024
fa7396f
format
Hk669 Jul 27, 2024
6672b8f
converse setup for model req-response
Hk669 Jul 28, 2024
02fdeb6
Renamed to bedrock.py, updated parameter parsing, system message extr…
marklysze Jul 30, 2024
4ccefdc
Merge remote-tracking branch 'origin/main' into aws-bedrock
marklysze Aug 1, 2024
7518fca
Established Bedrock class based on @astroalek and @ChristianT's code,…
marklysze Aug 1, 2024
f480f5f
Merge remote-tracking branch 'origin/main' into aws-bedrock
marklysze Aug 6, 2024
98a88ea
Image parsing and removing access credential checks
marklysze Aug 7, 2024
6b81ad7
Added tests, added additional parameter support
marklysze Aug 7, 2024
5f66699
Amazon Bedrock documentation
marklysze Aug 8, 2024
41d4b05
Merge branch 'main' into aws-bedrock
marklysze Aug 8, 2024
15eea18
Moved client parameters to init, align parameter names with Anthropic…
marklysze Aug 9, 2024
fb6c134
Merge remote-tracking branch 'origin/main' into aws-bedrock
marklysze Aug 9, 2024
25ace45
Tidy up comments
marklysze Aug 9, 2024
f2a6858
Merge branch 'main' into aws-bedrock
marklysze Aug 12, 2024
ca3bfd5
Minor typo fix
marklysze Aug 12, 2024
879d1a8
Merge branch 'main' into aws-bedrock
marklysze Aug 16, 2024
41fe91f
Merge branch 'main' into aws-bedrock
Hk669 Aug 16, 2024
fdf8a2f
Merge branch 'main' into aws-bedrock
marklysze Aug 16, 2024
5a59e9a
Correct comment re aws_region
marklysze Aug 17, 2024
467c5fe
Merge branch 'main' into aws-bedrock
thinkall Aug 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/contrib-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -612,3 +612,43 @@ jobs:
with:
file: ./coverage.xml
flags: unittests

BedrockTest:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-2019]
python-version: ["3.9", "3.10", "3.11", "3.12"]
exclude:
- os: macos-latest
python-version: "3.9"
steps:
- uses: actions/checkout@v4
with:
lfs: true
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install packages and dependencies for all tests
run: |
python -m pip install --upgrade pip wheel
pip install pytest-cov>=5
- name: Install packages and dependencies for Amazon Bedrock
run: |
pip install -e .[boto3,test]
- name: Set AUTOGEN_USE_DOCKER based on OS
shell: bash
run: |
if [[ ${{ matrix.os }} != ubuntu-latest ]]; then
echo "AUTOGEN_USE_DOCKER=False" >> $GITHUB_ENV
fi
- name: Coverage
run: |
pytest test/oai/test_bedrock.py --skip-openai
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
flags: unittests
2 changes: 2 additions & 0 deletions autogen/logger/file_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
if TYPE_CHECKING:
from autogen import Agent, ConversableAgent, OpenAIWrapper
from autogen.oai.anthropic import AnthropicClient
from autogen.oai.bedrock import BedrockClient
from autogen.oai.cohere import CohereClient
from autogen.oai.gemini import GeminiClient
from autogen.oai.groq import GroqClient
Expand Down Expand Up @@ -215,6 +216,7 @@ def log_new_client(
| TogetherClient
| GroqClient
| CohereClient
| BedrockClient
),
wrapper: OpenAIWrapper,
init_args: Dict[str, Any],
Expand Down
2 changes: 2 additions & 0 deletions autogen/logger/sqlite_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
if TYPE_CHECKING:
from autogen import Agent, ConversableAgent, OpenAIWrapper
from autogen.oai.anthropic import AnthropicClient
from autogen.oai.bedrock import BedrockClient
from autogen.oai.cohere import CohereClient
from autogen.oai.gemini import GeminiClient
from autogen.oai.groq import GroqClient
Expand Down Expand Up @@ -402,6 +403,7 @@ def log_new_client(
TogetherClient,
GroqClient,
CohereClient,
BedrockClient,
],
wrapper: OpenAIWrapper,
init_args: Dict[str, Any],
Expand Down
Loading
Loading