coze-studio icon indicating copy to clipboard operation
coze-studio copied to clipboard

ollama模型配置错误

Open saowu opened this issue 1 year ago • 7 comments

Image Image 求助看看

saowu avatar Jul 26 '25 01:07 saowu

Have you configured ollama in the .env file?

Image

ghost avatar Jul 26 '25 02:07 ghost

Have you configured ollama in the .env file?您是否在 .env 文件中配置了 ollama?

Image

This is indeed the problem. The document does not state that .env needs to be configured.

saowu avatar Jul 26 '25 02:07 saowu

Have you configured ollama in the .env file?您是否在 .env 文件中配置了 ollama? Image

This is indeed the problem. The document does not state that .env needs to be configured.

你在.env中配置之后能成功运行了吗? 我配置openai也有类似的问题

mir-xiong avatar Jul 26 '25 08:07 mir-xiong

VLLM启动的qwen模型,如下配置: api_key 随便写

meta:
    name: Qwen3-235B-A22B-Instruct-2507
    protocol: qwen
    capability:
        function_call: true
        input_modal:
            - text
        input_tokens: 224000
        json_mode: true
        max_tokens: 256000
        output_modal:
            - text
        output_tokens: 32000
        prefix_caching: false
        reasoning: false
        prefill_response: false
    conn_config:
        base_url: "http://192.168.0.3:8002/v1"
        api_key: "qweasdzxc"
        timeout: 0s
        model: "Qwen3-235B-A22B-Instruct-2507"
        temperature: 0.1
        frequency_penalty: 0
        presence_penalty: 0
        max_tokens: 4096
        top_p: 0.7
        top_k: 0
        stop: []
        openai: null
        claude: null
        ark: null
        deepseek: null
        qwen: null
        gemini: null
        custom: {}
    status: 0

huhu-tiger avatar Jul 26 '25 08:07 huhu-tiger

ollama.yaml正确配置后,.env不需要再额外配置。

另外,宿主机上需要使用 ollama serve 启动ollama

============

我的ollama.yaml配置如下:

id: 2003
name: qwen3
icon_uri: default_icon/ollama.png
icon_url: ""
description:
    zh: ollama 模型简介
    en: ollama model description
default_parameters:
    - name: temperature
      label:
        zh: 生成随机性
        en: Temperature
      desc:
        zh: '- **temperature**: 调高温度会使得模型的输出更多样性和创新性,反之,降低温度会使输出内容更加遵循指令要求但减少多样性。建议不要与“Top p”同时调整。'
        en: '**Temperature**:\n\n- When you increase this value, the model outputs more diverse and innovative content; when you decrease it, the model outputs less diverse content that strictly follows the given instructions.\n- It is recommended not to adjust this value with \"Top p\" at the same time.'
      type: float
      min: "0"
      max: "1"
      default_val:
        balance: "0.8"
        creative: "1"
        default_val: "1.0"
        precise: "0.3"
      precision: 1
      options: []
      style:
        widget: slider
        label:
            zh: 生成多样性
            en: Generation diversity
    - name: max_tokens
      label:
        zh: 最大回复长度
        en: Response max length
      desc:
        zh: 控制模型输出的Tokens 长度上限。通常 100 Tokens 约等于 150 个中文汉字。
        en: You can specify the maximum length of the tokens output through this value. Typically, 100 tokens are approximately equal to 150 Chinese characters.
      type: int
      min: "1"
      max: "4096"
      default_val:
        default_val: "4096"
      options: []
      style:
        widget: slider
        label:
            zh: 输入及输出设置
            en: Input and output settings
meta:
    name: qwen3
    protocol: ollama
    capability:
        function_call: true
        input_modal:
            - text
        input_tokens: 128000
        json_mode: false
        max_tokens: 128000
        output_modal:
            - text
        output_tokens: 16384
        prefix_caching: false
        reasoning: false
        prefill_response: false
    conn_config:
        base_url: "http://host.docker.internal:11434"
        api_key: ""
        timeout: 0s
        model: "qwen3"
        temperature: 0.6
        frequency_penalty: 0
        presence_penalty: 0
        max_tokens: 4096
        top_p: 0.95
        top_k: 20
        stop: []
        openai: null
        claude: null
        ark: null
        deepseek: null
        qwen: null
        gemini: null
        custom: {}
    status: 0

yaoyonstudio avatar Jul 26 '25 12:07 yaoyonstudio

timeout的时间设置大一点试试,比如300s左右

jueyuansanqv avatar Jul 28 '25 07:07 jueyuansanqv

Closing this issue for now — if anything else comes up, feel free to reopen and respond here.

fanlv avatar Jul 31 '25 10:07 fanlv