Skip to content

Commit 3d24984

Browse files
patched-adminpatched.codes[bot]
andauthored
Patched patchwork/steps/AgenticLLMV2/README.md (#1329)
Co-authored-by: patched.codes[bot] <298395+patched.codes[bot]@users.noreply.github.com>
1 parent 7f9996b commit 3d24984

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# AgenticLLMV2 Module Documentation
2+
3+
## Overview
4+
The `AgenticLLMV2` module provides a step for executing a multi-turn conversation strategy using the `AgenticStrategyV2` framework. This is part of a system that involves complex conversational models and tool integrations. The module is composed of three scripts: an initializer, the main class implementation, and type definitions for controlled inputs and outputs.
5+
6+
## Components
7+
8+
### 1. AgenticLLMV2/__init__.py
9+
This script is an initializer for the `AgenticLLMV2` module. It currently contains no code but serves to correctly package the Python files in this directory.
10+
11+
### 2. AgenticLLMV2/AgenticLLMV2.py
12+
13+
#### Description
14+
This file implements the `AgenticLLMV2` class, which extends the `Step` class and is responsible for managing the setup and execution of an `AgenticStrategyV2` conversation process.
15+
16+
#### Inputs
17+
18+
- `base_path` (str): The base path for tool configurations. Defaults to the current working directory if not specified.
19+
- `prompt_value` (Dict[str, Any]): Template data used in the prompts.
20+
- `system_prompt` (str): The system prompt used if not overridden.
21+
- `user_prompt` (str): Prompt provided for user-specific queries.
22+
- `max_agent_calls` (int): Maximum number of turns for agent calls. Defaults to 1.
23+
- `anthropic_api_key` (str): API key for Anthropic.
24+
- `agent_system_prompt` (str): Custom system prompt for agents.
25+
- `example_json` (str): JSON format data for prompt examples.
26+
27+
#### Outputs
28+
29+
- `request_tokens` (int): The number of tokens in the request.
30+
- `response_tokens` (int): The number of tokens in the response.
31+
32+
#### Usage
33+
To use the `AgenticLLMV2` class, instantiate it with `AgenticLLMV2Inputs`, then call the `run()` method to perform the conversation operations. It integrates tools found at the specified base path and supports a configurable number of conversation turns.
34+
35+
### 3. AgenticLLMV2/typed.py
36+
37+
#### Description
38+
This script defines the data types used for input and output of the `AgenticLLMV2` class using Python's `TypedDict` for structured data handling.
39+
40+
#### Inputs
41+
- Inputs are defined in `AgenticLLMV2Inputs` which includes optional attributes such as `base_path`, `prompt_value`, and more, facilitating flexible configuration of the agent strategy.
42+
43+
#### Outputs
44+
- Outputs are defined in `AgenticLLMV2Outputs`, ensuring that only request and response token counts are recorded as outputs.
45+
46+
## How to Use
47+
1. Define input parameters using `AgenticLLMV2Inputs`.
48+
2. Initialize the `AgenticLLMV2` class with these inputs.
49+
3. Execute the `run()` method to process a conversation based on the configured strategy.
50+
4. Analyze the token usage from the outputs to understand usage and billing metrics if needed.
51+
52+
This module is useful for developers working on advanced AI conversational systems, offering customization and detailed control over conversation flows and tools used within those flows.

0 commit comments

Comments
 (0)