로컬에서 Ollama와 Discourse AI 연동 방법

다음과 같이 실행했습니다:

ollama serve
ollama run phi4

# 테스트

curl http://localhost:11434/v1/chat/completions \
              -H "Content-Type: application/json" \
              -d '{
              "model": "phi4",
              "messages": [
                  {
                      "role": "system",
                      "content": "You are a helpful assistant."
                  },
                  {
                      "role": "user",
                      "content": "How much is 1+1?"
                  }
              ]
          }' -s | jq .choices[].message.content

"The sum of 1 + 1 is 2. \n\nIn basic arithmetic, when you add one unit to another single unit, the total number becomes two units. This operation is part of fundamental addition principles used in mathematics. Is there anything else I can help with regarding math or any other topic?"

Helper에서 테스트했습니다