Update README.md
This commit is contained in:
41
README.md
41
README.md
@@ -11,6 +11,26 @@ A composable DSPy agent that optimizes tweets using a reflective generate-evalua
|
|||||||
- **Structured Evaluation**: 1-9 scoring with detailed reasoning per category
|
- **Structured Evaluation**: 1-9 scoring with detailed reasoning per category
|
||||||
- **Easy Configuration**: Flexible model, iteration, and patience settings
|
- **Easy Configuration**: Flexible model, iteration, and patience settings
|
||||||
|
|
||||||
|
### Quick Usage
|
||||||
|
|
||||||
|
```python
|
||||||
|
# Load this pre-trained agent from Modaic Hub
|
||||||
|
from modaic import AutoAgent
|
||||||
|
|
||||||
|
tweet_optimizer = AutoAgent.from_precompiled("farouk1/tweet-optimizer-v2")
|
||||||
|
|
||||||
|
results = tweet_optimizer(
|
||||||
|
input_text="Your tweet content here",
|
||||||
|
iterations=20,
|
||||||
|
patience=7
|
||||||
|
)
|
||||||
|
|
||||||
|
print(f"Original: {results.initial_text}")
|
||||||
|
print(f"Optimized: {results.final_tweet}")
|
||||||
|
print(f"Score: {results.best_score:.2f}")
|
||||||
|
print(f"Iterations: {results.iterations_run}")
|
||||||
|
```
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
### Prerequisites
|
### Prerequisites
|
||||||
@@ -98,27 +118,6 @@ agent.push_to_hub(
|
|||||||
)
|
)
|
||||||
```
|
```
|
||||||
|
|
||||||
### Load from Hub
|
|
||||||
|
|
||||||
```python
|
|
||||||
# Load this pre-trained agent from Modaic Hub
|
|
||||||
from modaic import AutoAgent
|
|
||||||
|
|
||||||
tweet_optimizer = AutoAgent.from_precompiled("farouk1/tweet-optimizer-v2")
|
|
||||||
|
|
||||||
# Use immediately
|
|
||||||
results = tweet_optimizer(
|
|
||||||
input_text="Your tweet content here",
|
|
||||||
iterations=20,
|
|
||||||
patience=7
|
|
||||||
)
|
|
||||||
|
|
||||||
print(f"Original: {results['initial_text']}")
|
|
||||||
print(f"Optimized: {results['final_tweet']}")
|
|
||||||
print(f"Score: {results['best_score']:.2f}")
|
|
||||||
print(f"Iterations: {results['iterations_run']}")
|
|
||||||
```
|
|
||||||
|
|
||||||
### Configuration Options
|
### Configuration Options
|
||||||
|
|
||||||
#### TweetOptimizerConfig
|
#### TweetOptimizerConfig
|
||||||
|
|||||||
Reference in New Issue
Block a user