Skip to content

ChatRequest.think=true does not enable model thinking #237

@changweige

Description

@changweige

JS ollama SDK version is 0.5.16.

ChatRequest.think=true does not enable model deep thinking. My workaroud is as follows:

      // Create streaming chat completion
      const response = await client.chat({
        model: modelName,
        messages: messages,
        stream: true,
        think: deepThinkingEnabled ? undefined : false, // XXX: `true` is enabling deep thinking mode in Ollama, is it a bug?
        options: {
          temperature: modelParams.temperature,
          top_p: modelParams.topP,
        },
      });

However, I think it's a bug?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions