Ollama Backend
OllamaBackend
Bases: HttpxBackend
Backend for interacting with Ollama's API.
Source code in mbodied/agents/backends/ollama_backend.py
65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
|
__init__(api_key=None, endpoint=None)
Initializes an OllamaBackend instance.
Source code in mbodied/agents/backends/ollama_backend.py
75 76 77 78 |
|
OllamaSerializer
Bases: Serializer
Serializer for Ollama-specific data formats.
Source code in mbodied/agents/backends/ollama_backend.py
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
|
extract_response(response)
classmethod
Extracts the response from the Ollama format.
Source code in mbodied/agents/backends/ollama_backend.py
48 49 50 51 52 53 |
|
serialize_image(image)
classmethod
Serializes an image to the Ollama format.
Source code in mbodied/agents/backends/ollama_backend.py
27 28 29 30 |
|
serialize_msg(message)
classmethod
Serializes a message to the Ollama format.
Source code in mbodied/agents/backends/ollama_backend.py
37 38 39 40 41 42 43 44 45 46 |
|
serialize_text(text)
classmethod
Serializes a text string to the Ollama format.
Source code in mbodied/agents/backends/ollama_backend.py
32 33 34 35 |
|