feat: Support OLLAMA provider

- Added OllamaClient to handle conversations with the Ollama API.
- Introduced OllamaDialect for managing thinking modes.
- Created data classes: OllamaFunctionCall, OllamaListedModel, OllamaMessage, OllamaShowRequest, OllamaShowResponse, OllamaTagsResponse, OllamaToolCall, OllamaToolDefinition, and OllamaToolFunction for structured API communication.
- Developed unit tests for OllamaClient to validate model listing, chat completion, streaming responses, and tool calling capabilities.
- Configured test properties for local Ollama instance.
This commit is contained in:
extio-de
2026-05-09 17:47:28 +02:00
parent 210de3c62f
commit 4ff231227e
33 changed files with 1468 additions and 60 deletions

View File

@@ -6,8 +6,12 @@ profile.model.cold=local-chatcompletion
profile.model.textcompletion=local-completion
profile.model.chatcompletion=local-chatcompletion
profile.model.ollama=local-ollama-chatcompletion
#profile.model.azure=llama3.3-70b-azure
agent.threads=2
client.collectStatistics=true
logging.level.root=INFO
logging.level.de.extio.lmlib=DEBUG

View File

@@ -0,0 +1,16 @@
category=OLLAMA
prompts=
tokenizer=fallback
tokenEncoding=cl100k_base
maxTokens=2500
maxContextLength=32768
temperature=0.3
topP=0.95
modelProvider=OLLAMA
modelName=
url=http://localhost:11434
apiKey=
cost1MInTokens=0
cost1MCachedInTokens=0
cost1MOutTokens=0
cost1MReasoningOutTokens=0

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<include resource="org/springframework/boot/logging/logback/base.xml" />
<logger name="de.extio" level="INFO"/>
<logger name="de.extio" level="DEBUG"/>
</configuration>