Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

documentation on what text response recognized by Theia 1.54.0 as tool call #14357

Open
bardThis opened this issue Oct 26, 2024 · 3 comments
Open
Labels

Comments

@bardThis
Copy link

bardThis commented Oct 26, 2024

Feature request: documentation on what tool call trigger is answered by Theia effectively. Then user can try to figure out how to coerce the model to output Theia-compatible tool call.
I've tried two ollama models that seem to be trying to calling tools (and listed as tools models on the ollama registry). However the style of text they are returning is not recognized by Theia as a tool call.

Theia AI Configuration [Experimental]
Agents -> Workspace Chat

ollama model 1:
Identifier: ollama/mistral-nemo:12b-instruct-2407-q2_K
Name: mistral-nemo:12b-instruct-2407-q2_K
Vendor: Ollama

Response:
[TOOL_CALLS][{"name": "getWorkspaceFileList", "arguments": {}}]


feature request: problem description "[TOOL_CALLS]" is not recognized by Theia as a tool call, need documentation on what the workaround is here.

User tries switching to ollama model 2:
Identifier: ollama/nemotron-mini:4b-instruct-q6_K
Name: nemotron-mini:4b-instruct-q6_K
Vendor: Ollama

Request

@workspace try again, i know you can use tools; list the most important files in my workspace
Response

 <toolcall> {"name":"getWorkspaceFileList","arguments": {}} </toolcall>

Timestamp: 10/26/2024, 12:39:25 PM


feature request: problem description "toolcall" is not recognized by Theia as a tool call, need documentation on what the workaround is here.

Although there is a response that looks like a toolcal the only thing displayed is the attempted toolcall and no other information.

Not sure if this code is an anchorpoint for this feature but seems to be a good starting point for investigation:

protected _name?: string;

Eclipse Theia IDE
Version 1.54.0
VS Code API Version: 1.93.1
thank you

@bardThis
Copy link
Author

bardThis commented Oct 26, 2024

Maybe better worded: requesting please a way to see model interaction history to verify if Theia 1.54.0 is sending a tool call to ollama in the format described in the link from the ollama repo below (and to check the response). The AI Agent history is great but looks nothing like an ollama toolcall for my attempted tools requests.

problem description: model interaction with ollama tools model looks like the screenshot, but it actually should look more like the text below this screenshot
image

Below text from https://github.com/ollama/ollama/blob/main/docs/api.md#chat-request-with-tools would be more debuggable.

Request

curl http://localhost:11434/api/chat -d '{
  "model": "llama3.2",
  "messages": [
    {
      "role": "user",
      "content": "What is the weather today in Paris?"
    }
  ],
  "stream": false,
  "tools": [
    {
      "type": "function",
      "function": {
        "name": "get_current_weather",
        "description": "Get the current weather for a location",
        "parameters": {
          "type": "object",
          "properties": {
            "location": {
              "type": "string",
              "description": "The location to get the weather for, e.g. San Francisco, CA"
            },
            "format": {
              "type": "string",
              "description": "The format to return the weather in, e.g. 'celsius' or 'fahrenheit'",
              "enum": ["celsius", "fahrenheit"]
            }
          },
          "required": ["location", "format"]
        }
      }
    }
  ]
}'

Response

{
  "model": "llama3.2",
  "created_at": "2024-07-22T20:33:28.123648Z",
  "message": {
    "role": "assistant",
    "content": "",
    "tool_calls": [
      {
        "function": {
          "name": "get_current_weather",
          "arguments": {
            "format": "celsius",
            "location": "Paris, FR"
          }
        }
      }
    ]
  },
  "done_reason": "stop",
  "done": true,
  "total_duration": 885095291,
  "load_duration": 3753500,
  "prompt_eval_count": 122,
  "prompt_eval_duration": 328493000,
  "eval_count": 33,
  "eval_duration": 552222000
}

@JonasHelming
Copy link
Contributor

@sdirix

@JonasHelming
Copy link
Contributor

@bardThis Are you aware that you can see the communication in the output view, too?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants