User Tools

Site Tools


ai:ollama-openwebui

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
ai:ollama-openwebui [2024/08/02 15:55] Wulf Rajekai:ollama-openwebui [2024/08/08 17:31] (current) Wulf Rajek
Line 288: Line 288:
 (Invoke-RestMethod http://localhost:11434/api/tags).Models.Name.ForEach{ docker exex -t ollama ollama pull $_ } (Invoke-RestMethod http://localhost:11434/api/tags).Models.Name.ForEach{ docker exex -t ollama ollama pull $_ }
 </code> </code>
 +
 +
 +====== Curl OpenAI API test ======
 +
 +<code>
 +curl http://localhost:11434/v1/chat/completions \
 +    -H "Content-Type: application/json" \
 +    -d '{
 +        "model": "llama3",
 +        "messages": [
 +            {
 +                "role": "system",
 +                "content": "You are a helpful assistant."
 +            },
 +            {
 +                "role": "user",
 +                "content": "Hello!"
 +            }
 +        ]
 +    }'
 +{"id":"chatcmpl-957","object":"chat.completion","created":1722601457,"model":"llama3","system_fingerprint":"fp_ollama","choices":[{"index":0,"message":{"role":"assistant","content":"Hi there! It's great to meet you! I'm here to help with any questions or tasks you might have. What brings you to this virtual space today? Are you looking for recommendations, seeking answers to a specific question, or maybe looking for some inspiration? Let me know, and I'll do my best to assist you."},"finish_reason":"stop"}],"usage":{"prompt_tokens":23,"completion_tokens":68,"total_tokens":91}}
 +</code>
 +
ai/ollama-openwebui.txt · Last modified: 2024/08/08 17:31 by Wulf Rajek