Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Anton Kulaga committed Jun 9, 2024
1 parent 144d4ea commit 1858623
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 31 deletions.
44 changes: 19 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,6 @@ There is no need in complicated chains and other abstractions, in fact popular l
We wrote this libraries while being pissed of by high complexity and wanted something controlled and simple.
Of course, you might comment that we do not have the ecosystem like, for example, tools and loaders. In reality, most of langchain tools are just very simple functions wrapped in their classes, you can always quickly look at them and re-implement them easier.

# Installation

If you want to install as pip package use:
```
pip install just-agents
```

If you want to contribute to the project you can use micromamba or other anaconda to install the environment
```
micromamba create -f environment.yaml
micromamba activate just-agents
```
then you can edit the library. Optionaly you can install it locally with:
```
pip install -e .
```


# Warning, the library is work in progress



# How it works

We use litellm library to interact with LLMs.
Expand All @@ -53,16 +31,32 @@ storekeeper: ChatAgent = ChatAgent(llm_options = LLAMA3,
role = "helpful storekeeper", goal="earn profit by selling what customers need", task="sell to the customer")


exchanges: int = 3
exchanges: int = 3 # how many times the agents will exchange messages
customer.memory.add_on_message(lambda m: logger.info(f"Customer: {m}") if m.role == "user" else logger.info(f"Storekeeper: {m}"))

customer_reply = "Hi."
for _ in range(exchanges):
storekeeper_reply = storekeeper.query(customer_reply)
customer_reply = customer.query(storekeeper_reply)

```

All prompts that we use are stored in yaml files that you can easily overload.

The only complex (but not mandatory) dependency that we use is Mako for prompt templates
The only complex (but not mandatory) dependency that we use is Mako for prompt templates

# Installation

If you want to install as pip package use:
```
pip install just-agents
```

If you want to contribute to the project you can use micromamba or other anaconda to install the environment
```
micromamba create -f environment.yaml
micromamba activate just-agents
```
then you can edit the library. Optionally you can install it locally with:
```
pip install -e .
```
3 changes: 2 additions & 1 deletion environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ dependencies:
- pytest #for tests
- typer #for CLI
- twine #for publishing
- starlette
- jupyter
- pip:
- litellm>=1.40.7
- jupyter
- numpydoc
- semanticscholar>=0.8.1
- Mako>=1.3.5
7 changes: 2 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
with codecs.open(os.path.join(here, "README.md"), encoding="utf-8") as fh:
long_description = "\n" + fh.read()

VERSION = '0.0.5'
VERSION = '0.0.6'
DESCRIPTION = 'Just Agents'
LONG_DESCRIPTION = 'LLM Agents that are implemented without unnecessary complexity'

Expand All @@ -21,14 +21,11 @@
long_description_content_type="text/markdown",
long_description=long_description,
packages=find_packages(),
install_requires=["litellm>=1.40.7", "numpydoc", "loguru", "requests", "mako"],
install_requires=["litellm>=1.40.7", "numpydoc", "loguru", "requests", "Mako", "starlette"],
extras_require={
'tools': [
# some default tools
'semanticscholar>=0.8.1'
],
'templates': [
'mako'
]
},
keywords=['python', 'llm', 'science', 'review', 'agents', 'AI'],
Expand Down

0 comments on commit 1858623

Please sign in to comment.