Chalice x Agents for Amazon Bedrock plug-ins
Project description
Chalice-A4AB
What is this?
Chalice plugin: Support Agents for Amazon Bedrock
PIP
Chalice-a4ab
https://pypi.org/project/chalice-a4ab/
Usage
- Install
pip install chalice-a4ab
- Replace
from chalice import Chalice
tofrom chalice_a4ab import Chalice
.
Before:
from chalice import Chalice
app = Chalice("app-name")
@app.router("path-name")
...
After:
from chalice_a4ab import Chalice
app = Chalice("app-name")
@app.router("path-name")
...
- Application work on Agents for Amazon Bedrock
Advanced Usage
Create OpenAPI Schema automatically.
- Install Chalice-spec
pip install chalice chalice-spec==0.7.0 chalice-a4ab boto3 pydantic
- Write Setting
from chalice_a4ab import Chalice, AgentsForAmazonBedrockConfig
# Set Config for Agents for Amazon bedrock
AgentsForAmazonBedrockConfig(
instructions="Situation Settings for talking with Human and agent.(more than 40 words)",
description="Description of application",
).apply()
app = Chalice(app_name="app-name")
@app.router("path-name")
...
documentation for @app.router
sample: https://github.com/TestBoxLab/chalice-spec
- Upload by bash
Create AWS Resource for Cloudformation
chalice-a4ab init --profile ${PROFILE_NAME} --region ${REGION_NAME}
Or Update Already Exists AWS Resource
chalice-a4ab sync --profile ${PROFILE_NAME} --region ${REGION_NAME}
Delete AWS Resource
chalice-a4ab delete
Develop
Setup
poetry install
Run test
poetry run pytest
Lisence
MIT
API
Command Line TOOL
Command | Descritpion |
---|---|
chalice-a4ab init | Create AWS resource for Agents for amazon bedrock |
chalice-a4ab sync | Sync OpenAPI schema to AWS |
chalice-a4ab delete | Delete AWS resource for Agents for amazon bedrock |
Options | Description |
---|---|
--bucket | Set S3 bucket name (for put OpenAPI schema) |
--profile | Set AWS Profile Name |
--region | Set AWS Region Name |
--help | Show Help |
API
AgentsForAmazonBedrockConfig
Method | Type | Description |
---|---|---|
apply | - | Current instace becomes global variable. |
agents_for_bedrock_schema_json | - | Get OpenAPI Schema |
save_schema_to_local | - | Save OpenAPI Schema to local folder |
save_schema_to_s3 | - | Upload OpenAPI Schema to S3 bucket |
save_config_to_local | - | Save Config setting to local folder |
get_global_config | static | Get global variable. |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
chalice_a4ab-0.1.4.tar.gz
(18.3 kB
view hashes)
Built Distribution
Close
Hashes for chalice_a4ab-0.1.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 809c699e4772a0d4f159161109651bb89587988577050a7dc93dcf78a65a80e1 |
|
MD5 | d7dc21a09190f3f965bfec15b2529377 |
|
BLAKE2b-256 | 4a0227e8f02f547a6771366631541d4295c4e33dc330032d69118961833640b7 |