ollama
code:run
$ brew install ollama
$ ollama serve # で
$ ollama run phi3
command
/clear
/set
tool 呼ぶ
curl で
code:curl.sh
{
"model": "cogito:8b",
"tools": [
{
"type": "function",
"function": {
"name": "add_numbers",
"description": "Add two numbers together",
"parameters": {
"type": "object",
"properties": {
"a": {
"type": "number",
"description": "First number to add"
},
"b": {
"type": "number",
"description": "Second number to add"
}
},
}
}
},
{
"type": "function",
"function": {
"name": "get_current_time",
"description": "Get the current time",
"parameters": {
"type": "object",
"properties": {
"timezone": {
"type": "string",
"description": "The timezone to get the current time for, e.g. 'UTC', 'America/New_York', 'Asia/Tokyo'"
}
},
}
}
}
],
"messages": [
{
"role": "user",
"content": "今ニューヨークは何時?"
}
],
"stream": false
}
JSON