Skip to content

Suggestion to use the OpenAI library for the Ollama provider #248

@renzepost

Description

@renzepost

Currently the Ollama provider makes HTTP calls to the Ollama API (the /api/chat endpoint). However, currently tool calling/automatic tool execution is not working. Tool calls are discarded from the response, and the Ollama API responses don't have tool ids, so they don't fit the AISuite model.

Ollama is partially compatible with the OpenAI API. I tested this and the OpenAI API does return tool ids, making it compatible with AISuite.

So I'd suggest to use the OpenAI library for the Ollama provider so that things like tool calling work better in AISuite. If this is OK I can look into creating a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions