Hello Bruno,
It seems that was emitted by Ollama.
Executing directly through POST http://localhost:11434/api/chat with the body:
{
"messages": [
{
"content": "\r\n Question: What is Bruno's favourite super hero?\r\n Answer the question using the memory content: Bruno's favourite super hero is Invincible",
"role": "user"
}
],
"temperature": 1,
"top_p": 1,
"n": 1,
"presence_penalty": 0,
"frequency_penalty": 0,
"model": "phi3",
"tools": [
{
"function": {
"name": "TextMemoryPlugin-Retrieve",
"description": "Key-based lookup for a specific memory",
"parameters": {
"type": "object",
"required": [
"key"
],
"properties": {
"key": {
"type": "string",
"description": "The key associated with the memory to retrieve"
},
"collection": {
"type": "string",
"description": "Memories collection associated with the memory to retrieve (default value: generic)"
}
}
}
},
"type": "function"
},
{
"function": {
"name": "TextMemoryPlugin-Recall",
"description": "Semantic search and return up to N memories related to the input text",
"parameters": {
"type": "object",
"required": [
"input"
],
"properties": {
"input": {
"type": "string",
"description": "The input text to find related memories for"
},
"collection": {
"type": "string",
"description": "Memories collection to search (default value: generic)"
},
"relevance": {
"type": [
"number",
"null"
],
"description": "The relevance score, from 0.0 to 1.0, where 1.0 means perfect match (default value: 0)"
},
"limit": {
"type": [
"integer",
"null"
],
"description": "The maximum number of relevant memories to recall (default value: 1)"
}
}
}
},
"type": "function"
},
{
"function": {
"name": "TextMemoryPlugin-Save",
"description": "Save information to semantic memory",
"parameters": {
"type": "object",
"required": [
"input",
"key"
],
"properties": {
"input": {
"type": "string",
"description": "The information to save"
},
"key": {
"type": "string",
"description": "The key associated with the information to save"
},
"collection": {
"type": "string",
"description": "Memories collection associated with the information to save (default value: generic)"
}
}
}
},
"type": "function"
},
{
"function": {
"name": "TextMemoryPlugin-Remove",
"description": "Remove specific memory",
"parameters": {
"type": "object",
"required": [
"key"
],
"properties": {
"key": {
"type": "string",
"description": "The key associated with the information to save"
},
"collection": {
"type": "string",
"description": "Memories collection associated with the information to save (default value: generic)"
}
}
}
},
"type": "function"
}
],
"tool_choice": "auto"
}
This body was extracted from HttpRequest.Content object.
Results in:
{
"error": "json: cannot unmarshal array into Go struct field .tools.function.parameters.properties.type of type string"
}
Is it some configuration that we must make inside Ollama ? Or It is the format of data rendered by Import Plugin?
If I remove the very strange array types like this one: "type" : [ "number", "null" ] to just "number", the error does not happens but another error raises:
{
"error": "phi3 does not support tools"
}
Maybe something is missing inside current libraries that are generating invalid types as array types or ollama does not support these array types anymore. And are there some directions about installing tools for phi3 inside ollama?
Best regards,
Antonio Rabelo