OllamAgent
OllamAgent is a wrapper aroundn Ollama API. Ollama is a mini framework for consuming, managing and maintaining SOTA (State of the Art) Large Language Models that have been Quantaized and optimized for deployment on edge devices, there is no need for 'OpenAI' or 'HuggingFace' API keys, or even 'API_KEY' for that matter, you can run these models within your own devices ensuring data privacy, security and most importantly accesibility to this cutting edge technology for people with limited resources.
It implements an Agent | Tools mini-framework that simplifies the ussage of the full set of features of the supported models (Currently only Mistral7B is supported).
Installation
pip install ollamagent
Usage
from ollamagent import APIClient, Agent, Tool
# Implementing an integration with a third party API
class MyAPI(APIClient):
base_url = "https://api.myapi.com"
headers = {
"Authorization": "Bearer MY_API_KEY"
}
async def my_api_method(self, data):
return await self.post("/my-api-method", data)
# Implementing a tool
class MyTool(Tool):
data: dict
@property
def api(self):
return MyAPI()
async def run(self):
return await self.api.my_api_method(self.data)
# Instantiating the agent
agent = Agent(tools=[MyTool])
# Interacting with the agent
async def main():
print(await agent.chat(message="Hello! Are you there?"))
>>> "Hello! I'm here, how can I help you?"
print(await agent.run_tool("MyTool", data={"key": "value"}))
>>> {"response": "from", "my": "api"}
asyncio.run(main())
Metadata
Release files for ollamagent 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| ollamagent-0.0.4.tar.gz | 10.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ollamagent-0.0.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 23.7 kB
Release files / ollamagent-0.0.4.tar.gz
| Download URL | ollamagent-0.0.4.tar.gz |
|---|---|
| Size | 10.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
516d510722b2c6edc8b7706d30dee3b55094e0202963360dffa9f89475159e5e
|
|
BLAKE2b-256 checksum How to use checksums |
82446780134c51ccd4c376ce4e4a018707ba8dfd085843fcd00fd8908effab53
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.1 CPython/3.12.1 Darwin/23.2.0
|
Release files / ollamagent-0.0.4-py3-none-any.whl
| Download URL | ollamagent-0.0.4-py3-none-any.whl |
|---|---|
| Size | 13.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
354f67d0af5be6a78f0f9113587d6b941dfdf1f935867d3f280cd44a6aa057b1
|
|
BLAKE2b-256 checksum How to use checksums |
0ade35aa5e5d0ef7f89256676b6f3d0027793c4f82338efb42caa92e3219767f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.1 CPython/3.12.1 Darwin/23.2.0
|
Security for ollamagent 0.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.