https://github.com/berquerant/my-ai-agent
https://github.com/berquerant/my-ai-agent
python
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/berquerant/my-ai-agent
- Owner: berquerant
- Created: 2025-04-05T20:37:20.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-29T00:20:30.000Z (about 1 year ago)
- Last Synced: 2025-04-29T00:38:55.586Z (about 1 year ago)
- Topics: python
- Language: Python
- Homepage:
- Size: 213 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# my-ai-agent
``` shell
❯ python -m my_ai_agent.cli -h
usage: cli.py [-h] [-m MODEL] [-u BASE_URL] [--debug] [--quiet] [-i INSTRUCTIONS] [-r ROLE_SEPARATOR]
[-s MESSAGE_SEPARATOR]
My AI agent.
options:
-h, --help show this help message and exit
-m, --model MODEL AI model, default: gpt-4o-mini
-u, --base_url BASE_URL
base url of API
--debug enable debug log
--quiet quiet log
-i, --instructions INSTRUCTIONS
instructions, system messages for the agent, @FILENAME is available
-r, --role_separator ROLE_SEPARATOR
role separator string, default: '>'
-s, --message_separator MESSAGE_SEPARATOR
message separator string, default: '\n---\n'
# Examples
## minimal
python -m my_ai_agent.cli < input.txt
## continue chat
python -m my_ai_agent.cli < input.txt > output.txt
// edit output.txt to append user reply
python -m my_ai_agent.cli < output.txt
## with instructions
python -m my_ai_agent.cli -i @instructions.txt < input.txt
## change API endpoint
python -m my_ai_agent.cli -u "ENDPOINT_TO_CHAT_COMPLETIONS_API like http://127.0.0.1:11434/v1"\
-m "MODEL" < input.txt
```