Skip to content

Commit 1f47222

Browse files
fix: address review feedback on example structure
- Fix README table links to use underscores matching actual directory names - Add comment to root pyproject.toml directing users to example subdirectories - Add missing langchain and openai deps to judge pyproject.toml - Read AWS_DEFAULT_REGION from env in bedrock example instead of hardcoding - Fix openai version constraint from >=0.2.0 to >=1.0.0 Co-Authored-By: traci@launchdarkly.com <traci@launchdarkly.com>
1 parent 675765f commit 1f47222

5 files changed

Lines changed: 12 additions & 5 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ This repository includes examples for `OpenAI`, `Bedrock`, `Gemini`, `LangChain`
3232
| **Bedrock** | Single provider using AWS Bedrock | [examples/bedrock](examples/bedrock/README.md) |
3333
| **Gemini** | Single provider using Google Gemini | [examples/gemini](examples/gemini/README.md) |
3434
| **LangChain** | Multiple providers via LangChain | [examples/langchain](examples/langchain/README.md) |
35-
| **LangGraph Agent** | Single agent using LangGraph | [examples/langgraph-agent](examples/langgraph-agent/README.md) |
36-
| **LangGraph Multi-Agent** | Multiple agents using LangGraph | [examples/langgraph-multi-agent](examples/langgraph-multi-agent/README.md) |
35+
| **LangGraph Agent** | Single agent using LangGraph | [examples/langgraph_agent](examples/langgraph_agent/README.md) |
36+
| **LangGraph Multi-Agent** | Multiple agents using LangGraph | [examples/langgraph_multi_agent](examples/langgraph_multi_agent/README.md) |
3737
| **Judge** | Judge evaluation of AI responses | [examples/judge](examples/judge/README.md) |
38-
| **Chat with Observability** | Observability plugin for AI chat monitoring | [examples/chat-observability](examples/chat-observability/README.md) |
38+
| **Chat with Observability** | Observability plugin for AI chat monitoring | [examples/chat_observability](examples/chat_observability/README.md) |

examples/bedrock/bedrock_example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
load_dotenv()
1010

11-
client = boto3.client("bedrock-runtime", region_name="us-east-1")
11+
client = boto3.client("bedrock-runtime", region_name=os.getenv('AWS_DEFAULT_REGION', 'us-east-1'))
1212

1313
# Set sdk_key to your LaunchDarkly SDK key.
1414
sdk_key = os.getenv('LAUNCHDARKLY_SDK_KEY')

examples/judge/pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ direct-judge-example = "direct_judge_example:main"
1818
python = "^3.10"
1919
python-dotenv = ">=1.0.0"
2020
launchdarkly-server-sdk-ai = "^0.17.0"
21+
launchdarkly-server-sdk-ai-langchain = "^0.4.0"
22+
openai = ">=1.0.0"
2123

2224
[build-system]
2325
requires = ["poetry-core"]

examples/openai/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ python = "^3.10"
1515
python-dotenv = ">=1.0.0"
1616
launchdarkly-server-sdk-ai = "^0.17.0"
1717
launchdarkly-server-sdk-ai-openai = "^0.3.0"
18-
openai = ">=0.2.0"
18+
openai = ">=1.0.0"
1919

2020
[build-system]
2121
requires = ["poetry-core"]

pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ authors = ["LaunchDarkly <dev@launchdarkly.com>"]
66
license = "Apache-2.0"
77
readme = "README.md"
88

9+
# Each example is self-contained with its own pyproject.toml.
10+
# To run an example, cd into its directory under examples/ and run:
11+
# poetry install && poetry run <example-name>
12+
# See each example's README for details.
13+
914
[tool.poetry.dependencies]
1015
python = "^3.10"
1116

0 commit comments

Comments
 (0)