Skip to content

Commit

Permalink
push 1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
josh-ashkinaze committed Jul 8, 2024
1 parent c308a77 commit 2a0a3e2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,17 +76,21 @@ con_answer = conservative_agent.process() # call agent.process() to get the resp
```

```python
from plurals.agent import Agent

# Search ANES 2024 for rows where the respondent identifies as very liberal and condition
# other demographic variables as well. Use the `empathetic` persona template from instructions.yaml which
# encourages storytelling above reason-giving.
liberal_agent = Agent(ideology="very liberal", persona_template='empathetic', model='gpt-4o', task=task)
liberal_agent.process()
lib_answer = liberal_agent.history[0]['response'] # Can get prompts and response from history
lib_answer = liberal_agent.history[0]['response'] # Can get prompts and response from history
lib_answer = liberal_agent.info['history'][0]['response'] # Can get history and more from info
```

```python
# Pass in system instructions directly
from plurals.agent import Agent

pirate_agent = Agent(system_instructions="You are a pirate.", model='gpt-4o', task=task)

# No system instructions so we get back default behavior
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ def read_requirements():

setup(
name="plurals",
version="0.1.3",
version="0.1.4",
description="A package supporting pluralistic multi-agent simulations.",
long_description=open('README.md').read(),
long_description_content_type="text/markdown",
Expand Down

0 comments on commit 2a0a3e2

Please sign in to comment.