|
1 |
| -# llm-change-agent |
| 1 | +# LLM Change Agent |
2 | 2 |
|
3 |
| -Ontobot change agent assistant that uses LLMs to generate change language.commands. |
| 3 | +## Overview |
| 4 | +LLM Change Agent is a command-line tool designed to interact with various language models from different providers. It allows users to generate text using specified models and providers. |
4 | 5 |
|
| 6 | +## Features |
| 7 | +- Given a prompt relevant to making ontology resource changes, the agent responds with KGCL change statements. |
| 8 | +- Supports OpenAI, Ollama, Anthropic and CBORG (LBNL hosted) models. |
| 9 | + |
| 10 | +## **:warning:** OpenAI, Anthropic and CBORG model use are subject to availability of corresponding keys as environment variables. |
| 11 | + |
| 12 | +## Installation |
| 13 | +To install the dependencies, run: |
| 14 | +```bash |
| 15 | +pip install llm-change-agent |
| 16 | +``` |
| 17 | + |
| 18 | +## Usage |
| 19 | +The CLI provides several commands to interact with the language models. |
| 20 | + |
| 21 | +### List Available Models |
| 22 | +To list all available models from supported providers: |
| 23 | +```bash |
| 24 | +lca list-models |
| 25 | + |
| 26 | +OpenAI models: |
| 27 | + gpt-4o-2024-08-06 |
| 28 | + gpt-4o-mini |
| 29 | + gpt-4o-mini-2024-07-18 |
| 30 | + gpt-4o-2024-05-13 |
| 31 | + gpt-4o |
| 32 | + gpt-4-turbo-2024-04-09 |
| 33 | + gpt-4-turbo |
| 34 | + gpt-4-turbo-preview |
| 35 | +Anthropic models: |
| 36 | + claude-3-5-sonnet-20240620 |
| 37 | + claude-3-opus-20240229 |
| 38 | + claude-3-sonnet-20240229 |
| 39 | + claude-3-haiku-20240307 |
| 40 | +Ollama models: |
| 41 | + llama3.1 |
| 42 | +LBL-CBORG models: |
| 43 | + lbl/llama-3 |
| 44 | + openai/gpt-4o-mini |
| 45 | + anthropic/claude-haiku |
| 46 | + anthropic/claude-sonnet |
| 47 | + anthropic/claude-opus |
| 48 | +``` |
| 49 | + |
| 50 | +### Generate Text |
| 51 | +To generate text using a specified model and provider: |
| 52 | +```bash |
| 53 | +lca execute --model <MODEL_NAME> --provider <PROVIDER_NAME> --prompt "<YOUR_PROMPT>" |
| 54 | +``` |
| 55 | +Replace `<MODEL_NAME>`, `<PROVIDER_NAME>`, and `<YOUR_PROMPT>` with your desired values. |
| 56 | + |
| 57 | +### Examples |
| 58 | +- Generate text using CBORG's `lbl/llama-3` model with a custom prompt: |
| 59 | +```bash |
| 60 | +lca execute --model lbl/llama-3 --prompt "I want to change the definition of class ABC:123 to 'foo bar' and also create a new class labelled 'bar foo' with the curie DEF:123." |
| 61 | +``` |
| 62 | +OR |
| 63 | +```bash |
| 64 | +lca execute --provider cborg --prompt "I want to change the definition of class ABC:123 to 'foo bar' and also create a new class labelled 'bar foo' with the curie DEF:123." |
| 65 | +``` |
| 66 | + |
| 67 | +generates |
| 68 | + |
| 69 | +```bash |
| 70 | +Final Answer: |
| 71 | + |
| 72 | +[ |
| 73 | + "change definition of ABC:123 to 'foo bar'", |
| 74 | + "create class DEF:123 'bar foo'" |
| 75 | +] |
| 76 | + |
| 77 | +``` |
| 78 | + |
| 79 | +## Development |
| 80 | +To run the project locally, clone the repository and navigate to the project directory: |
| 81 | +```bash |
| 82 | +git clone https://github.com/yourusername/llm-change-agent.git |
| 83 | +cd llm-change-agent |
| 84 | +poetry install |
| 85 | +``` |
| 86 | +Make sure you have `poetry` installed in your system. |
| 87 | + |
| 88 | +## Contributing |
| 89 | +Contributions are welcome! Please submit a pull request or open an issue to discuss any changes. |
| 90 | + |
| 91 | +## License |
| 92 | +This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details. |
| 93 | + |
| 94 | +--- |
5 | 95 | # Acknowledgements
|
6 | 96 |
|
7 | 97 | This [cookiecutter](https://cookiecutter.readthedocs.io/en/stable/README.html) project was developed from the [monarch-project-template](https://github.com/monarch-initiative/monarch-project-template) template and will be kept up-to-date using [cruft](https://cruft.github.io/cruft/).
|
0 commit comments