Skip to content

Commit 8c5b286

Browse files
committed
Remove dropdowns
1 parent b66d0b2 commit 8c5b286

File tree

5 files changed

+12
-90
lines changed

5 files changed

+12
-90
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
__pycache__/
33
*.py[cod]
44
*$py.class
5+
uv.lock
56

67
# C extensions
78
*.so

README.md

+9-87
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,17 @@ The primary [search tool](./src/react_agent/tools.py) [^1] used is [Tavily](http
4040
Setup instruction auto-generated by `langgraph template lock`. DO NOT EDIT MANUALLY.
4141
-->
4242

43-
<details>
44-
<summary>Setup for `model_name`</summary>
45-
The `llm` configuration defaults are shown below:
43+
### Setup Model
44+
45+
The defaults values for `model` are shown below:
4646

4747
```yaml
48-
model_name: anthropic/claude-3-5-sonnet-20240620
48+
model: anthropic/claude-3-5-sonnet-20240620
4949
```
5050
5151
Follow the instructions below to get set up, or pick one of the additional options.
5252
53-
### Anthropic Chat Models
53+
#### Anthropic
5454
5555
To use Anthropic's chat models:
5656
@@ -60,17 +60,7 @@ To use Anthropic's chat models:
6060
```
6161
ANTHROPIC_API_KEY=your-api-key
6262
```
63-
### Fireworks Chat Models
64-
65-
To use Fireworks AI's chat models:
66-
67-
1. # for a [Fireworks AI account](https://app.fireworks.ai/#) and obtain an API key.
68-
2. Add your Fireworks AI API key to your `.env` file:
69-
70-
```
71-
FIREWORKS_API_KEY=your-api-key
72-
```
73-
#### OpenAI Chat Models
63+
#### OpenAI
7464
7565
To use OpenAI's chat models:
7666
@@ -80,7 +70,7 @@ To use OpenAI's chat models:
8070
OPENAI_API_KEY=your-api-key
8171
```
8272
83-
</details>
73+
8474
8575
8676
@@ -96,7 +86,7 @@ End setup instructions
9686
9787
1. **Add new tools**: Extend the agent's capabilities by adding new tools in [tools.py](./src/react_agent/tools.py). These can be any Python functions that perform specific tasks.
9888
2. **Select a different model**: We default to Anthropic's Claude 3 Sonnet. You can select a compatible chat model using `provider/model-name` via configuration. Example: `openai/gpt-4-turbo-preview`.
99-
3. **Customize the prompt**: We provide a default system prompt in [configuration.py](./src/react_agent/configuration.py). You can easily update this via configuration in the studio.
89+
3. **Customize the prompt**: We provide a default system prompt in [prompts.py](./src/react_agent/prompts.py). You can easily update this via configuration in the studio.
10090
10191
You can also quickly extend this template by:
10292
@@ -122,7 +112,7 @@ Configuration auto-generated by `langgraph template lock`. DO NOT EDIT MANUALLY.
122112
"agent": {
123113
"type": "object",
124114
"properties": {
125-
"model_name": {
115+
"model": {
126116
"type": "string",
127117
"default": "anthropic/claude-3-5-sonnet-20240620",
128118
"description": "The name of the language model to use for the agent's main interactions. Should be in the form: provider/model-name.",
@@ -159,74 +149,6 @@ Configuration auto-generated by `langgraph template lock`. DO NOT EDIT MANUALLY.
159149
"value": "anthropic/claude-instant-1.2",
160150
"variables": "ANTHROPIC_API_KEY"
161151
},
162-
{
163-
"value": "fireworks/gemma2-9b-it",
164-
"variables": "FIREWORKS_API_KEY"
165-
},
166-
{
167-
"value": "fireworks/llama-v3-70b-instruct",
168-
"variables": "FIREWORKS_API_KEY"
169-
},
170-
{
171-
"value": "fireworks/llama-v3-70b-instruct-hf",
172-
"variables": "FIREWORKS_API_KEY"
173-
},
174-
{
175-
"value": "fireworks/llama-v3-8b-instruct",
176-
"variables": "FIREWORKS_API_KEY"
177-
},
178-
{
179-
"value": "fireworks/llama-v3-8b-instruct-hf",
180-
"variables": "FIREWORKS_API_KEY"
181-
},
182-
{
183-
"value": "fireworks/llama-v3p1-405b-instruct",
184-
"variables": "FIREWORKS_API_KEY"
185-
},
186-
{
187-
"value": "fireworks/llama-v3p1-405b-instruct-long",
188-
"variables": "FIREWORKS_API_KEY"
189-
},
190-
{
191-
"value": "fireworks/llama-v3p1-70b-instruct",
192-
"variables": "FIREWORKS_API_KEY"
193-
},
194-
{
195-
"value": "fireworks/llama-v3p1-8b-instruct",
196-
"variables": "FIREWORKS_API_KEY"
197-
},
198-
{
199-
"value": "fireworks/mixtral-8x22b-instruct",
200-
"variables": "FIREWORKS_API_KEY"
201-
},
202-
{
203-
"value": "fireworks/mixtral-8x7b-instruct",
204-
"variables": "FIREWORKS_API_KEY"
205-
},
206-
{
207-
"value": "fireworks/mixtral-8x7b-instruct-hf",
208-
"variables": "FIREWORKS_API_KEY"
209-
},
210-
{
211-
"value": "fireworks/mythomax-l2-13b",
212-
"variables": "FIREWORKS_API_KEY"
213-
},
214-
{
215-
"value": "fireworks/phi-3-vision-128k-instruct",
216-
"variables": "FIREWORKS_API_KEY"
217-
},
218-
{
219-
"value": "fireworks/phi-3p5-vision-instruct",
220-
"variables": "FIREWORKS_API_KEY"
221-
},
222-
{
223-
"value": "fireworks/starcoder-16b",
224-
"variables": "FIREWORKS_API_KEY"
225-
},
226-
{
227-
"value": "fireworks/yi-large",
228-
"variables": "FIREWORKS_API_KEY"
229-
},
230152
{
231153
"value": "openai/gpt-3.5-turbo",
232154
"variables": "OPENAI_API_KEY"

src/react_agent/configuration.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class Configuration:
2222
},
2323
)
2424

25-
model_name: Annotated[str, {"__template_metadata__": {"kind": "llm"}}] = field(
25+
model: Annotated[str, {"__template_metadata__": {"kind": "llm"}}] = field(
2626
default="anthropic/claude-3-5-sonnet-20240620",
2727
metadata={
2828
"description": "The name of the language model to use for the agent's main interactions. "

src/react_agent/graph.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ async def call_model(
4242
)
4343

4444
# Initialize the model with tool binding. Change the model or add more tools here.
45-
model = load_chat_model(configuration.model_name).bind_tools(TOOLS)
45+
model = load_chat_model(configuration.model).bind_tools(TOOLS)
4646

4747
# Prepare the input for the model, including the current system time
4848
message_value = await prompt.ainvoke(

tests/integration_tests/test_graph.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import pytest
22
from langsmith import unit
3-
43
from react_agent import graph
54

65

0 commit comments

Comments
 (0)