Skip to content

Commit b97c863

Browse files
authored
feat: Group examples by provider first (#28)
1 parent 8841856 commit b97c863

32 files changed

Lines changed: 41 additions & 41 deletions

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232

3333
- name: Install dependencies
3434
run: |
35-
for dir in getting_started/completion_config/*/ getting_started/agent_config/*/ features/*/; do
35+
for dir in getting_started/*/**/ features/*/; do
3636
echo "Installing $dir"
3737
poetry -C "$dir" install
3838
done

README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,24 @@ For more comprehensive instructions, visit the [Quickstart page](https://docs.la
1313

1414
## Getting Started
1515

16-
These examples show how to integrate LaunchDarkly AI with different providers using `completion_config` and `agent_config`.
16+
These examples show how to integrate LaunchDarkly AI with different providers.
1717

18-
| Example | Description |
19-
| --- | --- |
20-
| [Bedrock](getting_started/completion_config/bedrock/) | `completion_config` with AWS Bedrock, metrics tracking |
21-
| [Gemini](getting_started/completion_config/gemini/) | `completion_config` with Google Gemini, metrics tracking |
22-
| [LangChain](getting_started/completion_config/langchain/) | `completion_config` with LangChain, async metrics tracking |
23-
| [LangGraph Agent](getting_started/agent_config/langgraph_agent/) | `agent_config` with a single LangGraph ReAct agent, tool calling, metrics tracking |
24-
| [LangGraph Multi-Agent](getting_started/agent_config/langgraph_multi_agent/) | `agent_config` with multiple LangGraph agents, custom StateGraph workflow, per-node metrics |
25-
| [OpenAI](getting_started/completion_config/openai/) | `completion_config` with OpenAI, automatic metrics tracking |
18+
| Provider | Example | Description |
19+
| --- | --- | --- |
20+
| Bedrock | [Converse](getting_started/bedrock/converse/) | `completion_config` with AWS Bedrock Converse API, metrics tracking |
21+
| Gemini | [Generate Content](getting_started/gemini/generate_content/) | `completion_config` with Google GenAI, metrics tracking |
22+
| LangChain | [Invoke](getting_started/langchain/invoke/) | `completion_config` with LangChain, async metrics tracking |
23+
| LangGraph | [ReAct Agent](getting_started/langgraph/react_agent/) | `agent_config` with a single LangGraph ReAct agent, tool calling, metrics tracking |
24+
| LangGraph | [StateGraph](getting_started/langgraph/state_graph/) | `agent_config` with multiple LangGraph agents, custom StateGraph workflow, per-node metrics |
25+
| OpenAI | [Chat Completions](getting_started/openai/chat_completions/) | `completion_config` with OpenAI, automatic metrics tracking |
2626

2727
## Features
2828

2929
These examples demonstrate LaunchDarkly's managed APIs and standalone capabilities.
3030

3131
| Example | Description |
3232
| --- | --- |
33-
| [Judge](features/judge/) | `create_judge` for standalone evaluation of AI responses |
34-
| [Managed Agent](features/managed_agent/) | `create_agent` with tool calling, automatic metrics tracking, and judge evaluation |
35-
| [Managed Agent Graph](features/managed_agent_graph/) | `create_agent_graph` with multi-node workflows, tool calling, per-node metrics, and judge evaluation |
36-
| [Managed Model](features/managed_model/) | `create_model` with managed chat, automatic metrics tracking, and judge evaluation |
33+
| [create_judge](features/create_judge/) | Standalone evaluation of AI responses |
34+
| [create_agent](features/create_agent/) | Tool calling, automatic metrics tracking, and judge evaluation |
35+
| [create_agent_graph](features/create_agent_graph/) | Multi-node workflows, tool calling, per-node metrics, and judge evaluation |
36+
| [create_model](features/create_model/) | Managed chat, automatic metrics tracking, and judge evaluation |
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Managed Agent Example
1+
# Create Agent Example
22

3-
This example demonstrates how to use LaunchDarkly's managed agent functionality, which handles model creation, metric tracking, and judge evaluation dispatch automatically.
3+
This example demonstrates how to use LaunchDarkly's `create_agent` method, which handles model creation, metric tracking, and judge evaluation dispatch automatically.
44

55
## Prerequisites
66

features/managed_agent/managed_agent_example.py renamed to features/create_agent/create_agent_example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ async def async_main():
7171
)
7272

7373
if not agent:
74-
print(f"*** Failed to create agent for key: {agent_config_key}")
74+
print(f"AI config '{agent_config_key}' is disabled. Verify the config key exists in your LaunchDarkly project and is not targeting a disabled variation.")
7575
return
7676

7777
sample_question = 'What is the weather in Tokyo?'
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ description = "Hello LaunchDarkly for Python AI - Managed Agent"
55
authors = ["LaunchDarkly <dev@launchdarkly.com>"]
66
license = "Apache-2.0"
77
readme = "README.md"
8-
packages = [{include = "managed_agent_example.py"}]
8+
packages = [{include = "create_agent_example.py"}]
99

1010
[tool.poetry.scripts]
11-
agent = "managed_agent_example:main"
11+
agent = "create_agent_example:main"
1212

1313
[tool.poetry.dependencies]
1414
python = "^3.10"
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Managed Agent Graph Example
1+
# Create Agent Graph Example
22

3-
This example demonstrates how to use LaunchDarkly's managed agent graph functionality, which orchestrates multi-node agent workflows with automatic metric tracking at both the graph and per-node level.
3+
This example demonstrates how to use LaunchDarkly's `create_agent_graph` method, which orchestrates multi-node agent workflows with automatic metric tracking at both the graph and per-node level.
44

55
## Prerequisites
66

features/managed_agent_graph/managed_agent_graph_example.py renamed to features/create_agent_graph/create_agent_graph_example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ async def async_main():
7474
)
7575

7676
if not graph:
77-
print(f"*** Failed to create agent graph for key: {graph_key}")
77+
print(f"AI config '{graph_key}' is disabled. Verify the config key exists in your LaunchDarkly project and is not targeting a disabled variation.")
7878
return
7979

8080
sample_question = 'Plan a trip to Tokyo next week. Find flights, hotels, and check the weather.'

features/managed_agent_graph/pyproject.toml renamed to features/create_agent_graph/pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ description = "Hello LaunchDarkly for Python AI - Managed Agent Graph"
55
authors = ["LaunchDarkly <dev@launchdarkly.com>"]
66
license = "Apache-2.0"
77
readme = "README.md"
8-
packages = [{include = "managed_agent_graph_example.py"}]
8+
packages = [{include = "create_agent_graph_example.py"}]
99

1010
[tool.poetry.scripts]
11-
agent-graph = "managed_agent_graph_example:main"
11+
agent-graph = "create_agent_graph_example:main"
1212

1313
[tool.poetry.dependencies]
1414
python = "^3.10"
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Judge Example (Direct Evaluation)
1+
# Create Judge Example
22

3-
This example demonstrates how to use LaunchDarkly's judge functionality to evaluate specific input/output pairs directly, without an associated chat session.
3+
This example demonstrates how to use LaunchDarkly's `create_judge` method to evaluate specific input/output pairs directly, without an associated chat session.
44

55
## Prerequisites
66

features/judge/judge_example.py renamed to features/create_judge/create_judge_example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ async def async_main():
6666
judge = aiclient.create_judge(judge_key, context)
6767

6868
if not judge:
69-
print(f"*** Failed to create judge for key: {judge_key}")
69+
print(f"AI config '{judge_key}' is disabled. Verify the config key exists in your LaunchDarkly project and is not targeting a disabled variation.")
7070
return
7171

7272
input_text = 'You are a helpful assistant for the company LaunchDarkly. How can you help me?'

0 commit comments

Comments
 (0)