Skip to content

Commit

Permalink
Use lwa_fastapi_middleware_bedrock_agent package in `bedrock-agent-…
Browse files Browse the repository at this point in the history
…fastapi` example (#361)

* Use `lwa_fastapi_middleware_bedrock_agent` middleware

* Add a comment about the middleware
  • Loading branch information
bnusunny authored Jan 29, 2024
1 parent e092a60 commit e052f60
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 83 deletions.
3 changes: 2 additions & 1 deletion examples/bedrock-agent-fastapi/app/main.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import datetime

import boto3
from middleware import BedrockAgentMiddleware
# This is from "lwa_fastapi_middleware_bedrock_agent" package (https://pypi.org/project/lwa-fastapi-middleware-bedrock-agent/)
from bedrock_agent.middleware import BedrockAgentMiddleware
from fastapi import FastAPI, Query
from pydantic import BaseModel, Field

Expand Down
82 changes: 0 additions & 82 deletions examples/bedrock-agent-fastapi/app/middleware.py

This file was deleted.

1 change: 1 addition & 0 deletions examples/bedrock-agent-fastapi/app/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ h11==0.14.0
httptools==0.6.1
idna==3.6
jmespath==1.0.1
lwa_fastapi_middleware_bedrock_agent==0.0.4
pydantic==2.5.3
pydantic_core==2.14.6
python-dateutil==2.8.2
Expand Down

0 comments on commit e052f60

Please sign in to comment.