Disable devmode, improve Readme
This commit is contained in:
17
Readme.md
17
Readme.md
@ -5,18 +5,17 @@ This is a simple example of an calculator "agent system" using the [Agents Platf
|
|||||||
Start by `docker compose up` and open web interface of management at <http://localhost:8080/>.
|
Start by `docker compose up` and open web interface of management at <http://localhost:8080/>.
|
||||||
|
|
||||||
## Calculator
|
## Calculator
|
||||||
|
A riddle is a math expression, e.g., `x * y =`.
|
||||||
|
The values of the variables `x` and `y` are defined via text files, e.g., a line `x = 10` in text file assigns the value to `12` to the variable `x`.
|
||||||
|
|
||||||
A riddle is a math expression, e.g., `x * y =` and the values of the variables `x` and `y` are defined via text files.
|
For example, the result of a riddle `x * x =` would be `100` with the explanation `10 * 10 = 100`.
|
||||||
For example a line `x = 12` in text file assigns the value to `12` to the variable `x`.
|
|
||||||
|
|
||||||
For example, the result of a riddle `x * x =` would be `144` with the explanation `12 * 12 = 144`.
|
|
||||||
|
|
||||||
## Riddle Example
|
## Riddle Example
|
||||||
In this example the values of the variables are [`x = 10`](./data/share/example/x.txt), [`y = 15`](./data/share/example/y.txt), [`z = 20`](./data/share/example/z.txt), see the files in [`./data/share/example/`](./data/share/example/).
|
In this example the values of the variables are [`x = 10`](./data/share/example/x.txt), [`y = 15`](./data/share/example/y.txt), and [`z = 20`](./data/share/example/z.txt); see the files in [`./data/share/example/`](./data/share/example/).
|
||||||
|
|
||||||
1. You may send a riddle to the management using the web interface (<http://localhost:8080/app/new>) and press "Send Message"
|
1. You can send a riddle to management via the web interface (http://localhost:8080/app/new) by filling out the form and clicking "Send Message.":
|
||||||

|

|
||||||
2. The message to the management will look like:
|
2. The message to management will look like this:
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"id": "test1",
|
"id": "test1",
|
||||||
@ -58,6 +57,6 @@ In this example the values of the variables are [`x = 10`](./data/share/example/
|
|||||||
"contacts": 0
|
"contacts": 0
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
3. Message will be send between agents for solving the riddle.
|
3. Afterwards, messages will be sent between agents while they solve the riddle. These messages are viewable in the web interface. (<http://localhost:8080/app/table>).
|
||||||
4. Result can be found in web interface (<http://localhost:8080/app/table>)
|
4. The result can finally be found in the latest message.:
|
||||||

|

|
@ -33,7 +33,7 @@ services:
|
|||||||
- ./data/persist-extract/:/ums-agenten/persist/
|
- ./data/persist-extract/:/ums-agenten/persist/
|
||||||
- ./src/:/ums-agenten/project/src/:ro
|
- ./src/:/ums-agenten/project/src/:ro
|
||||||
# for development: will detect file changes and reload server with new source
|
# for development: will detect file changes and reload server with new source
|
||||||
entrypoint: bash -c "SERVE=true uvicorn ums.agent.main:app --host 0.0.0.0 --port 8000 --reload --reload-dir /ums-agenten/project/src/"
|
#entrypoint: bash -c "SERVE=true uvicorn ums.agent.main:app --host 0.0.0.0 --port 8000 --reload --reload-dir /ums-agenten/project/src/"
|
||||||
|
|
||||||
agent_solve:
|
agent_solve:
|
||||||
image: git.chai.uni-hamburg.de/ums-agenten/base-agent:cpu-arm64
|
image: git.chai.uni-hamburg.de/ums-agenten/base-agent:cpu-arm64
|
||||||
@ -47,7 +47,7 @@ services:
|
|||||||
- ./data/share/:/ums-agenten/share/
|
- ./data/share/:/ums-agenten/share/
|
||||||
- ./data/persist-solve/:/ums-agenten/persist/
|
- ./data/persist-solve/:/ums-agenten/persist/
|
||||||
- ./src/:/ums-agenten/project/src/:ro
|
- ./src/:/ums-agenten/project/src/:ro
|
||||||
entrypoint: bash -c "SERVE=true uvicorn ums.agent.main:app --host 0.0.0.0 --port 8000 --reload --reload-dir /ums-agenten/project/src/"
|
#entrypoint: bash -c "SERVE=true uvicorn ums.agent.main:app --host 0.0.0.0 --port 8000 --reload --reload-dir /ums-agenten/project/src/"
|
||||||
|
|
||||||
agent_gatekeeper:
|
agent_gatekeeper:
|
||||||
image: git.chai.uni-hamburg.de/ums-agenten/base-agent:cpu-arm64
|
image: git.chai.uni-hamburg.de/ums-agenten/base-agent:cpu-arm64
|
||||||
@ -61,5 +61,5 @@ services:
|
|||||||
- ./data/share/:/ums-agenten/share/
|
- ./data/share/:/ums-agenten/share/
|
||||||
- ./data/persist-validate/:/ums-agenten/persist/
|
- ./data/persist-validate/:/ums-agenten/persist/
|
||||||
- ./src/:/ums-agenten/project/src/:ro
|
- ./src/:/ums-agenten/project/src/:ro
|
||||||
entrypoint: bash -c "SERVE=true uvicorn ums.agent.main:app --host 0.0.0.0 --port 8000 --reload --reload-dir /ums-agenten/project/src/"
|
#entrypoint: bash -c "SERVE=true uvicorn ums.agent.main:app --host 0.0.0.0 --port 8000 --reload --reload-dir /ums-agenten/project/src/"
|
||||||
|
|
@ -8,7 +8,7 @@
|
|||||||
import re
|
import re
|
||||||
|
|
||||||
from ums.agent import ExtractTextAgent
|
from ums.agent import ExtractTextAgent
|
||||||
from ums.utils import RiddleData, ExtractedData, ExtractedContent
|
from ums.utils import RiddleData, ExtractedData
|
||||||
|
|
||||||
class CalculatorExtractVariables(ExtractTextAgent):
|
class CalculatorExtractVariables(ExtractTextAgent):
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user