Skip to content

Can not Integrate LocalAI with ultraworkers/claw-code #10162

@1511563371

Description

@1511563371

LocalAI version: Version: v4.3.6 (aee4611)

Environment, CPU architecture, OS, and Version:
zc@zc-MS-7E13:~/LocalAI$ uname -a
Linux zc-MS-7E13 5.15.0-91-generic #101-Ubuntu SMP Tue Nov 14 13:30:08 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

Describe the bug
I wanna integrate LocalAI with ultraworkers/claw-code.
However, there was an issue of being unable to find the model when using it.

My operation
1 model location

zc@zc-MS-7E13:~/LocalAI/models$ tree .
.
├── DeepSeek-R1-Distill-Qwen-1.5B-BF16.yaml
└── local
    └── DeepSeek-R1-Distill-Qwen-1.5B-BF16.gguf

2 yaml configuration

zc@zc-MS-7E13:~/LocalAI/models$ cat DeepSeek-R1-Distill-Qwen-1.5B-BF16.yaml 
name: DeepSeek-R1-Distill-Qwen-1.5B-BF16
parameters: 
  model: local/DeepSeek-R1-Distill-Qwen-1.5B-BF16.gguf # 匹配模型文件名
context_size: 8192
threads: 8
backend: llama-cpp
preload: true

3 run LocalAI

zc@zc-MS-7E13:~/LocalAI$ ./localai run --models-path="./models" --address localhost:8080

4 run ultraworkers/claw-code

export ANTHROPIC_BASE_URL=http://127.0.0.1:8080/
export ANTHROPIC_API_KEY=anthropic

or
export OPENAI_BASE_URL="http://localhost:8080/v1"
export OPENAI_API_KEY="localai"

./claw --model local/DeepSeek-R1-Distill-Qwen-1.5B-BF16.gguf

5 problems
LocalAI try to Downloading url="https://huggingface.co/bartowski/DeepSeek-R1-Distill-Qwen-1.5B-GGUF/resolve/main/DeepSeek-R1-Distill-Qwen-1.5B-Q4_K_M.gguf" rather than directly Using local/DeepSeek-R1-Distill-Qwen-1.5B-Q4_K_M.gguf

Jun 03 08:03:23 INFO  HTTP request method="POST" path="/v1/chat/completions" status=200 
Jun 03 08:04:08 INFO  Downloading url="https://huggingface.co/bartowski/DeepSeek-R1-Distill-Qwen-1.5B-GGUF/resolve/main/DeepSeek-R1-Distill-Qwen-1.5B-Q4_K_M.gguf" 
Jun 03 08:04:38 ERROR failed to install model from gallery error=failed to download file "/home/zc/LocalAI/models/DeepSeek-R1-Distill-Qwen-1.5B-Q4_K_M.gguf": Get "https://huggingface.co/bartowski/DeepSeek-R1-Distill-Qwen-1.5B-GGUF/resolve/main/DeepSeek-R1-Distill-Qwen-1.5B-Q4_K_M.gguf": dial tcp [2a03:2880:f117:83:face:b00c:0:25de]:443: i/o timeout model="local/DeepSeek-R1-Distill-Qwen-1.5B-BF16.gguf" 
Jun 03 08:04:38 INFO  Trying to load the model modelID="Deepseek-R1-Distill-Qwen-1.5B" backends=[cpu-llama-cpp llama-cpp] 
Jun 03 08:04:38 INFO  Attempting to load backend="cpu-llama-cpp" 
Jun 03 08:04:38 INFO  BackendLoader starting modelID="Deepseek-R1-Distill-Qwen-1.5B" backend="cpu-llama-cpp" model="local/DeepSeek-R1-Distill-Qwen-1.5B-BF16.gguf" 
Jun 03 08:04:42 INFO  Loads OK backend="cpu-llama-cpp" 
Jun 03 08:05:09 INFO  HTTP request method="POST" path="/v1/chat/completions" status=200 

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions