Comments (7)
@Twilek-de It works for me if I set the API URL to http://localhost:11434/v1
Maybe just add the /v1
?
If that doesn't work for you please post the mattermost server logs and any logs from ollama.
from mattermost-plugin-ai.
@Twilek-de Just noted Ollama adding OpenAI compatibility: https://ollama.ai/blog/openai-compatibility
Does that work for you?
from mattermost-plugin-ai.
Oh good catch. Just fired up Ollama with their latest docker container. OpenAI compatible endpoint works fine when evoking it with curl. With Mattermost AI plugin nothing happens. There is no error message but the ollama container does not ramp up CPU time, as it does when it is running a query. DonΒ΄t know what is happing.
I have checked that Mattermost is really seeing the ollama container in the docker network, it does. My settings look like this.
Running curl http://ollama:11434/v1/chat/completions -H "Content-Type: application/json" -d '{"model": "llama2","messages": [{"role": "system","content": "You are a helpful assistant."},{"role": "user","content": "Hello!"}]}'
inside the mattermost container works just fine, so it is not connectivity.
Mattermost config.json looks like this:
"mattermost-ai": { "config": { "allowPrivateChannels": true, "allowedTeamIds": "chat", "enableLLMTrace": false, "enableUserRestrictions": false, "imageGeneratorBackend": "Ollama", "llmBackend": "Ollama", "onlyUsersOnTeam": "", "services": [ { "apiKey": "", "defaultModel": "llama2", "id": "j5dr1bnste", "name": "Ollama", "password": "", "serviceName": "openaicompatible", "url": "http://ollama:11434", "username": "" } ], "transcriptBackend": "Ollama" } },
from mattermost-plugin-ai.
Hmm Ollama supports a subset of the OpenAI API, namely completion. There is no support for streaming yet and I seem to remember that the MM AI Plugin uses the streaming endpoint....
Update:
Scratch that, the Ollama docu says streaming is supported as well...
from mattermost-plugin-ai.
Yes! That was it. Works now for me too. Thanks!
from mattermost-plugin-ai.
Hmm somehow the new version does time out. Is there any way to edit the timeout,,,
{
"caller": "app/plugin_api.go:1003",
"error": "timeout streaming",
"level": "error",
"msg": "Streaming result to post failed",
"plugin_id": "mattermost-ai",
"timestamp": "2024-03-12 22:22:33.939 Z"
}
from mattermost-plugin-ai.
Found the "streamingTimeoutSeconds" setting. Is working again now.
from mattermost-plugin-ai.
Related Issues (20)
- π‘ idea: Add Organization Input Option to Open AI Engine Configuration Form
- π‘ idea: Is it possible to make it work properly without setting up the github plugin? HOT 1
- π bug: not work with LocalAI backend HOT 10
- π bug: Anthropic model integration Issue: Header requirement error and failed responses HOT 5
- π bug: deleting suggested prompt prevents me from using another suggested prompt
- π‘ idea: add supported Mattermost server versions to README
- π bug: When replying in a thread, the response from OpenAI is not updated on the main screen in the stream.
- Why Does My AI Reply to My Threads Instead of Posting Directly in the Channel? HOT 5
- π‘ idea: add google gemini to list of supported backends HOT 2
- π‘ idea: Update README header image to say "Mattermost AI Copilot" instead of "The Mattermost AI Plugin"
- π‘ idea: remove duplicative docs
- π‘ idea: add a data-preloaded Mattermost server to facilitate demos and testing
- π‘ idea: Take into account the user locale for AI actions HOT 8
- π‘ idea: Soften the Enterprise requirement for multiple LLM backends (Add AI Service) HOT 2
- π‘ idea: Plugin operation via proxy
- Initiating an Indefinite Number of Same Bot Conversation
- π‘ idea: Export Prometheus Metrics about usage
- Design Preview: AI-enhanced Search
- π bug: timeout streaming error when used with LocalAI HOT 2
- π bug: prompt buttons populate the Thread input instead of AI RHS input
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mattermost-plugin-ai.