logancyang / obsidian-copilot

THE Copilot in Obsidian
https://www.obsidiancopilot.com/
GNU Affero General Public License v3.0
3.04k stars 212 forks source link

ollama embed error #805

Open SullivanNagler opened 1 week ago

SullivanNagler commented 1 week ago

Hello ! I have some troubles with the embed model in the qa mode :

image

Copilot version: 2.71 nixos with obsidian from flatpak Describe how to reproduce

Expected behavior the embed model doesn’t work and throw an error Screenshots image image

Additional context ollama serve debug mode :

[GIN] 2024/11/12 - 18:53:15 | 404 |       4.996µs |       127.0.0.1 | POST     "/api/embed"
[GIN] 2024/11/12 - 18:53:23 | 404 |       5.224µs |       127.0.0.1 | POST     "/api/embed"
[GIN] 2024/11/12 - 18:53:40 | 200 | 25.700941378s |       127.0.0.1 | POST     "/api/chat"
[GIN] 2024/11/12 - 18:53:45 | 200 | 29.690213833s |       127.0.0.1 | POST     "/api/chat"
[GIN] 2024/11/12 - 18:53:54 | 200 |  8.956036105s |       127.0.0.1 | POST     "/api/chat"
[GIN] 2024/11/12 - 18:53:54 | 404 |        4.04µs |       127.0.0.1 | POST     "/api/embed"
[GIN] 2024/11/12 - 18:53:55 | 404 |       5.597µs |       127.0.0.1 | POST     "/api/embed"
[GIN] 2024/11/12 - 18:53:58 | 404 |       6.059µs |       127.0.0.1 | POST     "/api/embed"
[GIN] 2024/11/12 - 18:54:04 | 200 |      33.222µs |       127.0.0.1 | HEAD     "/"
[GIN] 2024/11/12 - 18:54:04 | 200 |      95.138µs |       127.0.0.1 | POST     "/api/push"
[GIN] 2024/11/12 - 18:54:05 | 404 |       7.937µs |       127.0.0.1 | POST     "/api/embed"
[GIN] 2024/11/12 - 18:54:13 | 200 |      25.334µs |       127.0.0.1 | HEAD     "/"
time=2024-11-12T18:54:13.942+01:00 level=ERROR source=images.go:969 msg="jwt token does not contain 3 parts"
time=2024-11-12T18:54:17.134+01:00 level=INFO source=download.go:136 msg="downloading 819c2adf5ce6 in 7 100 MB part(s)"
[GIN] 2024/11/12 - 18:54:27 | 200 |      11.737µs |       127.0.0.1 | HEAD     "/"
[GIN] 2024/11/12 - 18:54:27 | 200 |     363.203µs |       127.0.0.1 | GET      "/api/tags"
time=2024-11-12T18:54:29.913+01:00 level=INFO source=download.go:136 msg="downloading b837481ff855 in 1 16 B part(s)"
time=2024-11-12T18:54:32.122+01:00 level=INFO source=download.go:136 msg="downloading 38badd946f91 in 1 408 B part(s)"
[GIN] 2024/11/12 - 18:54:33 | 200 | 19.865920901s |       127.0.0.1 | POST     "/api/pull"
[GIN] 2024/11/12 - 18:54:51 | 404 |       5.375µs |       127.0.0.1 | POST     "/api/embed"

Btw, the chat works great. Feel free to ask me other question from my setup or do some debug thing. Thanks for your time and your usefull plugin ! Sullivan NAGLER (i’m french, so excuse me for my approximate english : )

logancyang commented 1 week ago

Hi @SullivanNagler, 404 could mean you don't have the model in ollama. What's your ollama list result and how did you add the model to Copilot?

SullivanNagler commented 1 week ago

Hi @logancyang, Thx for your quick answer, Here a screen of the model in ollama list:  image I added the model in copilot as ollama in the qa section. I’ve also tried with the nixos package of obsidian. So it’s not a problem from flatpak.

logancyang commented 1 week ago

@SullivanNagler you need to provide the exact name mxbai-embed-large in the model name field. I just tried and it's working for me. Can you go through the setup guide and try again, share a screenshot of how you add your custom model if possible. Right now I can't repro this error.

wwjCMP commented 6 days ago

What version of ollama are you using

SullivanNagler commented 6 days ago

ollama version : 0.1.38

SullivanNagler commented 6 days ago

thx, i will try tonight

@SullivanNagler you need to provide the exact name mxbai-embed-large in the model name field. I just tried and it's working for me. Can you go through the setup guide and try again, share a screenshot of how you add your custom model if possible. Right now I can't repro this error.

SullivanNagler commented 5 days ago

Hello ! Is this log helping ?

[orbitingstar@orbitingstar:~]$ ollama pull nomic-embed-text
pulling manifest 
pulling 970aa74c0a90... 100% ▕██████████████████████████████████████████████▏ 274 MB                         
pulling c71d239df917... 100% ▕██████████████████████████████████████████████▏  11 KB                         
pulling ce4a164fc046... 100% ▕██████████████████████████████████████████████▏   17 B                         
pulling 31df23ea7daa... 100% ▕██████████████████████████████████████████████▏  420 B                         
verifying sha256 digest 
writing manifest 
removing any unused layers 
success 

[orbitingstar@orbitingstar:~]$ sudo systemctl stop ollama
[sudo] Mot de passe de orbitingstar : 

[orbitingstar@orbitingstar:~]$ OLLAMA_ORIGINS=app://obsidian.md* ollama serve
2024/11/14 16:40:00 routes.go:1008: INFO server config env="map[OLLAMA_DEBUG:false OLLAMA_LLM_LIBRARY: OLLAMA_MAX_LOADED_MODELS:1 OLLAMA_MAX_QUEUE:512 OLLAMA_MAX_VRAM:0 OLLAMA_NOPRUNE:false OLLAMA_NUM_PARALLEL:1 OLLAMA_ORIGINS:[app://obsidian.md* http://localhost https://localhost http://localhost:* https://localhost:* http://127.0.0.1 https://127.0.0.1 http://127.0.0.1:* https://127.0.0.1:* http://0.0.0.0 https://0.0.0.0 http://0.0.0.0:* https://0.0.0.0:*] OLLAMA_RUNNERS_DIR: OLLAMA_TMPDIR:]"
time=2024-11-14T16:40:00.481+01:00 level=INFO source=images.go:704 msg="total blobs: 31"
time=2024-11-14T16:40:00.483+01:00 level=INFO source=images.go:711 msg="total unused blobs removed: 0"
[GIN-debug] [WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached.

[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
 - using env:   export GIN_MODE=release
 - using code:  gin.SetMode(gin.ReleaseMode)

[GIN-debug] POST   /api/pull                 --> github.com/ollama/ollama/server.(*Server).PullModelHandler-fm (5 handlers)
[GIN-debug] POST   /api/generate             --> github.com/ollama/ollama/server.(*Server).GenerateHandler-fm (5 handlers)
[GIN-debug] POST   /api/chat                 --> github.com/ollama/ollama/server.(*Server).ChatHandler-fm (5 handlers)
[GIN-debug] POST   /api/embeddings           --> github.com/ollama/ollama/server.(*Server).EmbeddingsHandler-fm (5 handlers)
[GIN-debug] POST   /api/create               --> github.com/ollama/ollama/server.(*Server).CreateModelHandler-fm (5 handlers)
[GIN-debug] POST   /api/push                 --> github.com/ollama/ollama/server.(*Server).PushModelHandler-fm (5 handlers)
[GIN-debug] POST   /api/copy                 --> github.com/ollama/ollama/server.(*Server).CopyModelHandler-fm (5 handlers)
[GIN-debug] DELETE /api/delete               --> github.com/ollama/ollama/server.(*Server).DeleteModelHandler-fm (5 handlers)
[GIN-debug] POST   /api/show                 --> github.com/ollama/ollama/server.(*Server).ShowModelHandler-fm (5 handlers)
[GIN-debug] POST   /api/blobs/:digest        --> github.com/ollama/ollama/server.(*Server).CreateBlobHandler-fm (5 handlers)
[GIN-debug] HEAD   /api/blobs/:digest        --> github.com/ollama/ollama/server.(*Server).HeadBlobHandler-fm (5 handlers)
[GIN-debug] GET    /api/ps                   --> github.com/ollama/ollama/server.(*Server).ProcessHandler-fm (5 handlers)
[GIN-debug] POST   /v1/chat/completions      --> github.com/ollama/ollama/server.(*Server).ChatHandler-fm (6 handlers)
[GIN-debug] GET    /                         --> github.com/ollama/ollama/server.(*Server).GenerateRoutes.func1 (5 handlers)
[GIN-debug] GET    /api/tags                 --> github.com/ollama/ollama/server.(*Server).ListModelsHandler-fm (5 handlers)
[GIN-debug] GET    /api/version              --> github.com/ollama/ollama/server.(*Server).GenerateRoutes.func2 (5 handlers)
[GIN-debug] HEAD   /                         --> github.com/ollama/ollama/server.(*Server).GenerateRoutes.func1 (5 handlers)
[GIN-debug] HEAD   /api/tags                 --> github.com/ollama/ollama/server.(*Server).ListModelsHandler-fm (5 handlers)
[GIN-debug] HEAD   /api/version              --> github.com/ollama/ollama/server.(*Server).GenerateRoutes.func2 (5 handlers)
time=2024-11-14T16:40:00.483+01:00 level=INFO source=routes.go:1054 msg="Listening on 127.0.0.1:11434 (version 0.1.38)"
time=2024-11-14T16:40:00.484+01:00 level=INFO source=payload.go:30 msg="extracting embedded files" dir=/tmp/ollama651424333/runners
time=2024-11-14T16:40:03.406+01:00 level=INFO source=payload.go:44 msg="Dynamic LLM libraries [cpu_avx cpu_avx2 cuda_v12 cpu]"
time=2024-11-14T16:40:03.469+01:00 level=INFO source=types.go:71 msg="inference compute" id=GPU-aac4422a-ddc6-ed9d-41b0-525a150e7734 library=cuda compute=8.9 driver=12.4 name="NVIDIA GeForce RTX 4070 Laptop GPU" total="7.7 GiB" available="7.0 GiB"
time=2024-11-14T16:40:27.658+01:00 level=INFO source=memory.go:133 msg="offload to gpu" layers.requested=-1 layers.real=17 memory.available="7.0 GiB" memory.required.full="10.4 GiB" memory.required.partial="6.8 GiB" memory.required.kv="4.0 GiB" memory.weights.total="3.8 GiB" memory.weights.repeating="3.7 GiB" memory.weights.nonrepeating="105.0 MiB" memory.graph.full="2.1 GiB" memory.graph.partial="2.2 GiB"
time=2024-11-14T16:40:27.658+01:00 level=INFO source=memory.go:133 msg="offload to gpu" layers.requested=-1 layers.real=17 memory.available="7.0 GiB" memory.required.full="10.4 GiB" memory.required.partial="6.8 GiB" memory.required.kv="4.0 GiB" memory.weights.total="3.8 GiB" memory.weights.repeating="3.7 GiB" memory.weights.nonrepeating="105.0 MiB" memory.graph.full="2.1 GiB" memory.graph.partial="2.2 GiB"
time=2024-11-14T16:40:27.658+01:00 level=INFO source=memory.go:133 msg="offload to gpu" layers.requested=-1 layers.real=17 memory.available="7.0 GiB" memory.required.full="10.4 GiB" memory.required.partial="6.8 GiB" memory.required.kv="4.0 GiB" memory.weights.total="3.8 GiB" memory.weights.repeating="3.7 GiB" memory.weights.nonrepeating="105.0 MiB" memory.graph.full="2.1 GiB" memory.graph.partial="2.2 GiB"
time=2024-11-14T16:40:27.659+01:00 level=INFO source=server.go:320 msg="starting llama server" cmd="/tmp/ollama651424333/runners/cuda_v12/ollama_llama_server --model /home/orbitingstar/.ollama/models/blobs/sha256-ff82381e2bea77d91c1b824c7afb83f6fb73e9f7de9dda631bcdbca564aa5435 --ctx-size 32768 --batch-size 512 --embedding --log-disable --n-gpu-layers 17 --parallel 1 --port 35873"
time=2024-11-14T16:40:27.659+01:00 level=INFO source=sched.go:338 msg="loaded runners" count=1
time=2024-11-14T16:40:27.659+01:00 level=INFO source=server.go:504 msg="waiting for llama runner to start responding"
time=2024-11-14T16:40:27.660+01:00 level=INFO source=server.go:540 msg="waiting for server to become available" status="llm server error"
INFO [main] build info | build=0 commit="unknown" tid="140262494855168" timestamp=1731598827
INFO [main] system info | n_threads=8 n_threads_batch=-1 system_info="AVX = 1 | AVX_VNNI = 0 | AVX2 = 0 | AVX512 = 0 | AVX512_VBMI = 0 | AVX512_VNNI = 0 | FMA = 0 | NEON = 0 | ARM_FMA = 0 | F16C = 0 | FP16_VA = 0 | WASM_SIMD = 0 | BLAS = 1 | SSE3 = 1 | SSSE3 = 1 | VSX = 0 | MATMUL_INT8 = 0 | LLAMAFILE = 1 | " tid="140262494855168" timestamp=1731598827 total_threads=32
INFO [main] HTTP server listening | hostname="127.0.0.1" n_threads_http="31" port="35873" tid="140262494855168" timestamp=1731598827
llama_model_loader: loaded meta data with 25 key-value pairs and 291 tensors from /home/orbitingstar/.ollama/models/blobs/sha256-ff82381e2bea77d91c1b824c7afb83f6fb73e9f7de9dda631bcdbca564aa5435 (version GGUF V3 (latest))
llama_model_loader: Dumping metadata keys/values. Note: KV overrides do not apply in this output.
llama_model_loader: - kv   0:                       general.architecture str              = llama
llama_model_loader: - kv   1:                               general.name str              = Mistral-7B-Instruct-v0.3
llama_model_loader: - kv   2:                          llama.block_count u32              = 32
llama_model_loader: - kv   3:                       llama.context_length u32              = 32768
llama_model_loader: - kv   4:                     llama.embedding_length u32              = 4096
llama_model_loader: - kv   5:                  llama.feed_forward_length u32              = 14336
llama_model_loader: - kv   6:                 llama.attention.head_count u32              = 32
llama_model_loader: - kv   7:              llama.attention.head_count_kv u32              = 8
llama_model_loader: - kv   8:                       llama.rope.freq_base f32              = 1000000.000000
llama_model_loader: - kv   9:     llama.attention.layer_norm_rms_epsilon f32              = 0.000010
llama_model_loader: - kv  10:                          general.file_type u32              = 2
llama_model_loader: - kv  11:                           llama.vocab_size u32              = 32768
llama_model_loader: - kv  12:                 llama.rope.dimension_count u32              = 128
llama_model_loader: - kv  13:                       tokenizer.ggml.model str              = llama
llama_model_loader: - kv  14:                         tokenizer.ggml.pre str              = default
llama_model_loader: - kv  15:                      tokenizer.ggml.tokens arr[str,32768]   = ["<unk>", "<s>", "</s>", "[INST]", "[...
llama_model_loader: - kv  16:                      tokenizer.ggml.scores arr[f32,32768]   = [0.000000, 0.000000, 0.000000, 0.0000...
llama_model_loader: - kv  17:                  tokenizer.ggml.token_type arr[i32,32768]   = [2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, ...
llama_model_loader: - kv  18:                tokenizer.ggml.bos_token_id u32              = 1
llama_model_loader: - kv  19:                tokenizer.ggml.eos_token_id u32              = 2
llama_model_loader: - kv  20:            tokenizer.ggml.unknown_token_id u32              = 0
llama_model_loader: - kv  21:               tokenizer.ggml.add_bos_token bool             = true
llama_model_loader: - kv  22:               tokenizer.ggml.add_eos_token bool             = false
llama_model_loader: - kv  23:                    tokenizer.chat_template str              = {{ bos_token }}{% for message in mess...
llama_model_loader: - kv  24:               general.quantization_version u32              = 2
llama_model_loader: - type  f32:   65 tensors
llama_model_loader: - type q4_0:  225 tensors
llama_model_loader: - type q6_K:    1 tensors
llm_load_vocab: special tokens definition check successful ( 1027/32768 ).
llm_load_print_meta: format           = GGUF V3 (latest)
llm_load_print_meta: arch             = llama
llm_load_print_meta: vocab type       = SPM
llm_load_print_meta: n_vocab          = 32768
llm_load_print_meta: n_merges         = 0
llm_load_print_meta: n_ctx_train      = 32768
llm_load_print_meta: n_embd           = 4096
llm_load_print_meta: n_head           = 32
llm_load_print_meta: n_head_kv        = 8
llm_load_print_meta: n_layer          = 32
llm_load_print_meta: n_rot            = 128
llm_load_print_meta: n_embd_head_k    = 128
llm_load_print_meta: n_embd_head_v    = 128
llm_load_print_meta: n_gqa            = 4
llm_load_print_meta: n_embd_k_gqa     = 1024
llm_load_print_meta: n_embd_v_gqa     = 1024
llm_load_print_meta: f_norm_eps       = 0.0e+00
llm_load_print_meta: f_norm_rms_eps   = 1.0e-05
llm_load_print_meta: f_clamp_kqv      = 0.0e+00
llm_load_print_meta: f_max_alibi_bias = 0.0e+00
llm_load_print_meta: f_logit_scale    = 0.0e+00
llm_load_print_meta: n_ff             = 14336
llm_load_print_meta: n_expert         = 0
llm_load_print_meta: n_expert_used    = 0
llm_load_print_meta: causal attn      = 1
llm_load_print_meta: pooling type     = 0
llm_load_print_meta: rope type        = 0
llm_load_print_meta: rope scaling     = linear
llm_load_print_meta: freq_base_train  = 1000000.0
llm_load_print_meta: freq_scale_train = 1
llm_load_print_meta: n_yarn_orig_ctx  = 32768
llm_load_print_meta: rope_finetuned   = unknown
llm_load_print_meta: ssm_d_conv       = 0
llm_load_print_meta: ssm_d_inner      = 0
llm_load_print_meta: ssm_d_state      = 0
llm_load_print_meta: ssm_dt_rank      = 0
llm_load_print_meta: model type       = 8B
llm_load_print_meta: model ftype      = Q4_0
llm_load_print_meta: model params     = 7.25 B
llm_load_print_meta: model size       = 3.83 GiB (4.54 BPW) 
llm_load_print_meta: general.name     = Mistral-7B-Instruct-v0.3
llm_load_print_meta: BOS token        = 1 '<s>'
llm_load_print_meta: EOS token        = 2 '</s>'
llm_load_print_meta: UNK token        = 0 '<unk>'
llm_load_print_meta: LF token         = 781 '<0x0A>'
ggml_cuda_init: GGML_CUDA_FORCE_MMQ:   yes
ggml_cuda_init: CUDA_USE_TENSOR_CORES: no
ggml_cuda_init: found 1 CUDA devices:
  Device 0: NVIDIA GeForce RTX 4070 Laptop GPU, compute capability 8.9, VMM: yes
llm_load_tensors: ggml ctx size =    0.30 MiB
time=2024-11-14T16:40:27.911+01:00 level=INFO source=server.go:540 msg="waiting for server to become available" status="llm server loading model"
llm_load_tensors: offloading 17 repeating layers to GPU
llm_load_tensors: offloaded 17/33 layers to GPU
llm_load_tensors:        CPU buffer size =  3922.02 MiB
llm_load_tensors:      CUDA0 buffer size =  1989.53 MiB
..................................................................................................
llama_new_context_with_model: n_ctx      = 32768
llama_new_context_with_model: n_batch    = 512
llama_new_context_with_model: n_ubatch   = 512
llama_new_context_with_model: freq_base  = 1000000.0
llama_new_context_with_model: freq_scale = 1
llama_kv_cache_init:  CUDA_Host KV buffer size =  1920.00 MiB
llama_kv_cache_init:      CUDA0 KV buffer size =  2176.00 MiB
llama_new_context_with_model: KV self size  = 4096.00 MiB, K (f16): 2048.00 MiB, V (f16): 2048.00 MiB
llama_new_context_with_model:  CUDA_Host  output buffer size =     0.14 MiB
llama_new_context_with_model:      CUDA0 compute buffer size =  2265.00 MiB
llama_new_context_with_model:  CUDA_Host compute buffer size =    72.01 MiB
llama_new_context_with_model: graph nodes  = 1030
llama_new_context_with_model: graph splits = 169
INFO [main] model loaded | tid="140262494855168" timestamp=1731598830
time=2024-11-14T16:40:31.009+01:00 level=INFO source=server.go:545 msg="llama runner started in 3.35 seconds"
[GIN] 2024/11/14 - 16:41:07 | 200 | 39.805309078s |       127.0.0.1 | POST     "/api/chat"
[GIN] 2024/11/14 - 16:41:10 | 200 |  39.17706708s |       127.0.0.1 | POST     "/api/chat"
[GIN] 2024/11/14 - 16:41:19 | 200 |  8.913488734s |       127.0.0.1 | POST     "/api/chat"
[GIN] 2024/11/14 - 16:41:19 | 404 |       5.596µs |       127.0.0.1 | POST     "/api/embed"
[GIN] 2024/11/14 - 16:41:21 | 404 |       7.063µs |       127.0.0.1 | POST     "/api/embed"
[GIN] 2024/11/14 - 16:41:24 | 404 |       6.485µs |       127.0.0.1 | POST     "/api/embed"
[GIN] 2024/11/14 - 16:41:28 | 404 |       7.849µs |       127.0.0.1 | POST     "/api/embed"
SullivanNagler commented 5 days ago

I think this log has a way to understand the problem : when i use embeddings and not embed, it works ?!

orbitingstar@orbitingstar:~]$ OLLAMA_ORIGINS=app://obsidian.md* ollama pull nomic-embed-text
pulling manifest 
pulling 970aa74c0a90... 100% ▕██████████████████████████████████████████████▏ 274 MB                         
pulling c71d239df917... 100% ▕██████████████████████████████████████████████▏  11 KB                         
pulling ce4a164fc046... 100% ▕██████████████████████████████████████████████▏   17 B                         
pulling 31df23ea7daa... 100% ▕██████████████████████████████████████████████▏  420 B                         
verifying sha256 digest 
writing manifest 
removing any unused layers 
success 

[orbitingstar@orbitingstar:~]$ curl -X POST \
  http://localhost:11434/api/embed \
  -H 'Content-Type: application/json' \
  -d '{"model": "nomic-embed-text", "prompt": "The sky is blue because of Rayleigh scattering"}'
404 page not found
[orbitingstar@orbitingstar:~]$ curl -X POST \
  http://localhost:11434/api/embed \
  -H 'Content-Type: application/json' \
  -d '{"model": "nomic-embed-text", "prompt": "The sky is blue because of Rayleigh scattering"}'
404 page not found
[orbitingstar@orbitingstar:~]$ curl -X POST \
  http://localhost:11434/api/embed \
  -H 'Content-Type: application/json' \
  -d '{"model": "nomic-embed-text", "prompt": "The sky is blue because of Rayleigh scattering"}'
404 page not found
[orbitingstar@orbitingstar:~]$ curl -X POST \
  http://localhost:11434/api/embeddings \
  -H 'Content-Type: application/json' \
  -d '{"model": "nomic-embed-text", "prompt": "The sky is blue because of Rayleigh scattering"}'
{"embedding":[-1.2465918064117432,0.090346559882164,0.6816676259040833,-0.6251460909843445,0.42274215817451477,-0.7623732089996338,1.40532648563385,0.018956400454044342,0.0021927878260612488,-0.8549789786338806,1.0216000080108643,0.6328088641166687,1.0102322101593018,1.409188151359558,0.30747026205062866,-0.43023252487182617,-1.3594486713409424,-1.065558671951294,0.2731874883174896,-1.5865004062652588,-0.99036705493927,-0.3131069242954254,-0.3200702369213104,0.5799629092216492,-1.387705683708191,-0.2409670054912567,-0.3221430480480194,0.017364419996738434,-0.949420690536499,0.41287124156951904,-0.46834221482276917,-0.6568096876144409,0.011762797832489014,0.7768152356147766,0.922430694103241,-0.19009007513523102,1.6252045631408691,1.0068796873092651,-0.7924360036849976,0.32642194628715515,-0.9111453890800476,-0.8035264611244202,-0.4132786989212036,0.32774031162261963,0.4320237338542938,-1.3702269792556763,-0.2893749475479126,-0.500838577747345,0.21995380520820618,0.04665816202759743,-0.6498501300811768,-0.241561159491539,-0.22227947413921356,-0.667762279510498,0.5553514361381531,1.0138111114501953,0.4502269923686981,0.5210801959037781,0.25213196873664856,0.8722693920135498,0.33341699838638306,1.7806742191314697,-0.24014586210250854,0.2749745845794678,0.6493021249771118,-1.1708654165267944,0.2703096568584442,-0.659223198890686,0.3287830352783203,0.17496654391288757,-0.2746133804321289,-1.1540296077728271,0.06157265603542328,0.7547256350517273,-1.2696475982666016,-0.6377580761909485,0.040790967643260956,-0.4723631739616394,-0.021495960652828217,0.5736372470855713,-0.05534622073173523,0.5193794369697571,-0.4394431710243225,-0.42897310853004456,0.052619725465774536,-0.4641900360584259,-0.00879826582968235,0.23157274723052979,0.01937866397202015,0.3927306532859802,-0.23941570520401,1.127303123474121,0.6627861857414246,0.12323033809661865,0.839216411113739,0.04619650915265083,-0.37067240476608276,-0.23101899027824402,-0.12232927232980728,-0.14367017149925232,-1.2298455238342285,-0.8830511569976807,-0.36024975776672363,0.0036956649273633957,0.4718570113182068,1.0297904014587402,0.9657220244407654,-0.0035531893372535706,-1.053256869316101,-0.27867692708969116,1.1555930376052856,-0.4380000829696655,0.29101240634918213,-0.2846490144729614,-0.9157416820526123,-1.4252971410751343,0.9093289375305176,0.36628833413124084,0.6858680844306946,0.5175997018814087,-0.16672326624393463,-0.039048053324222565,-0.4680964946746826,-0.9010747671127319,-0.5573341846466064,-0.4263384938240051,-0.3993304669857025,0.6848556399345398,-0.579386830329895,-0.19134193658828735,-0.5732994079589844,-0.13494524359703064,0.017369741573929787,-0.3553176820278168,0.5528892874717712,-0.2696318030357361,0.7595236301422119,-1.2150077819824219,-0.5486730337142944,0.5606701374053955,-0.5748746395111084,0.21591317653656006,1.0939728021621704,0.25197914242744446,0.6751306653022766,0.41904404759407043,0.3394264578819275,0.5639326572418213,0.719070553779602,0.8886446952819824,-0.6167030930519104,-1.133454442024231,-0.7178269028663635,0.5843878984451294,0.377702921628952,0.8379657864570618,-0.7282707691192627,0.5418977737426758,-0.25859495997428894,0.18085326254367828,1.3668832778930664,2.4082207679748535,-0.5504498481750488,0.3914312422275543,-0.16685889661312103,-0.8432232141494751,0.6679339408874512,-0.7210561633110046,-0.1669730842113495,0.6995906233787537,-1.3219819068908691,0.12255163490772247,0.1341327428817749,-0.1877734512090683,0.8460869193077087,-0.667300283908844,1.8909913301467896,-0.35780829191207886,0.7488849759101868,-0.1684769243001938,0.17372971773147583,0.13675980269908905,0.5400648713111877,-0.9791698455810547,-0.9498662352561951,0.8206644058227539,0.6999362707138062,-0.9174817800521851,-1.2024508714675903,0.23349930346012115,-0.6562589406967163,-0.35276854038238525,-0.8959110975265503,0.4697285592556,-0.6471002697944641,-0.9191601276397705,0.7352639436721802,-0.05877651274204254,-1.0022211074829102,0.887100875377655,0.3059440553188324,-0.6225295662879944,0.05824633315205574,0.43660253286361694,0.12659156322479248,0.4818476736545563,-0.21188001334667206,1.5617592334747314,-1.0488532781600952,-1.3527841567993164,0.9127167463302612,0.2920493185520172,0.27098405361175537,1.1116265058517456,0.6085341572761536,0.11165820807218552,-0.9432405829429626,-0.9401528239250183,-0.9815059304237366,1.4629236459732056,-0.8023925423622131,1.0923244953155518,-0.3754737675189972,-1.4357558488845825,-1.5894618034362793,0.956229567527771,-0.5843803882598877,-0.05225839093327522,2.0520737171173096,0.03155084699392319,-0.6467154026031494,0.7724640369415283,0.12962757050991058,1.19645094871521,-0.42383700609207153,-0.15121382474899292,0.805210530757904,0.911363959312439,0.2606687843799591,-0.20062774419784546,-1.5508837699890137,1.9758979082107544,-1.8517303466796875,-0.8262208104133606,-0.38519957661628723,-0.2802935242652893,-1.1964420080184937,-0.44942134618759155,0.29067859053611755,-0.14189141988754272,0.06675024330615997,0.8030766248703003,0.9687129855155945,0.4176967740058899,-0.2422490417957306,-1.2096573114395142,-0.14142027497291565,-0.7689412832260132,1.4713716506958008,-1.7254447937011719,-0.010678155347704887,1.2374236583709717,0.2978615164756775,-0.6902830004692078,-0.6883750557899475,1.4223347902297974,-1.2220968008041382,0.1061217337846756,0.4496854841709137,-0.4132915735244751,1.7480731010437012,1.1471850872039795,0.7966291308403015,0.12032315135002136,0.09672654420137405,-0.3905167579650879,-0.8080397248268127,0.8551421761512756,0.48317739367485046,0.8646369576454163,-0.7662625908851624,-1.5011265277862549,0.9685628414154053,1.1182361841201782,-0.3440190553665161,1.4185842275619507,-0.32799720764160156,1.2818782329559326,-0.044768624007701874,0.3338766098022461,0.4772222638130188,0.8732005953788757,0.4087023138999939,0.031348057091236115,0.4118615388870239,1.0059199333190918,1.5567665100097656,-0.4163393974304199,-0.491305947303772,-0.3856869637966156,-0.48317813873291016,-1.066470742225647,1.0468909740447998,-0.551810085773468,0.49518513679504395,-0.36762669682502747,0.13313478231430054,1.0760165452957153,-0.26101750135421753,2.1496129035949707,-0.37642616033554077,0.6960071325302124,-0.8461251854896545,-0.14165765047073364,-0.5397567749023438,0.17625997960567474,0.09447342157363892,-1.3892488479614258,-0.21325081586837769,0.2161490023136139,-0.16623623669147491,-1.474687933921814,-0.20167168974876404,-0.9535852074623108,-0.4966937005519867,0.6747230291366577,-0.39588940143585205,0.4260982871055603,-1.8152329921722412,-0.5598329305648804,-1.6594040393829346,-0.5441668629646301,0.9718769192695618,1.1068575382232666,-1.096070647239685,0.2188490331172943,0.562549352645874,-0.13783521950244904,0.5945684313774109,1.4685919284820557,-0.2795668840408325,0.4055751860141754,-0.13192301988601685,0.2952781915664673,-1.4357863664627075,-1.1975210905075073,0.9515193104743958,-1.369051456451416,0.20018136501312256,-0.4282183349132538,-0.8005268573760986,0.9026294946670532,-0.7743803858757019,0.10321015864610672,-0.33142897486686707,-0.9800776243209839,-1.3111895322799683,1.0337433815002441,0.14542649686336517,-0.5733067393302917,-0.6428179740905762,-1.0396188497543335,-0.9594331383705139,0.05934879928827286,-0.3449312150478363,-0.7273001670837402,0.7574412226676941,-0.13784366846084595,-0.8441421389579773,-0.49728506803512573,0.4154749810695648,0.2615259885787964,-0.05419859290122986,-0.13309036195278168,-0.5889257192611694,0.08217831701040268,-0.2881050407886505,-0.30688127875328064,0.4823305010795593,-1.9801064729690552,0.6563634276390076,-0.12000618129968643,0.025696992874145508,-0.7725984454154968,-1.6474976539611816,0.5688998699188232,1.4583847522735596,-0.31730717420578003,-1.4466819763183594,-0.12388063967227936,-0.11115776747465134,-0.9544748067855835,0.07606547325849533,0.21403296291828156,0.35738518834114075,-0.9014339447021484,0.39127182960510254,-0.5255975127220154,-0.9472633600234985,0.2732221484184265,-0.6171334385871887,-0.16125525534152985,-0.13933596014976501,0.11234938353300095,0.1603081077337265,1.7113194465637207,0.5463194847106934,-0.584071159362793,0.05545618012547493,0.5302817821502686,1.6558430194854736,0.10662837326526642,-0.4371787905693054,-0.10663048923015594,-0.2874327301979065,-0.07046239823102951,0.30977320671081543,0.25183725357055664,0.12677259743213654,1.9993624687194824,-0.5658867955207825,-0.1995236575603485,0.904964804649353,0.6311915516853333,-0.056948430836200714,0.8709196448326111,0.25687745213508606,0.24962395429611206,0.5835146307945251,0.5540726184844971,-0.8147799968719482,-0.20823736488819122,-0.5802520513534546,-0.1802981197834015,-1.0760655403137207,2.2168874740600586,0.1354791522026062,0.8029768466949463,0.655026912689209,-0.040953852236270905,0.7989441156387329,0.6318936944007874,-0.8444485664367676,-0.12263667583465576,0.8024766445159912,0.6614334583282471,0.7937520146369934,-0.21950647234916687,-0.015498494729399681,0.5909104943275452,0.3500536382198334,-0.5073437094688416,0.1615113914012909,-0.15899723768234253,-0.2894626557826996,-0.19645428657531738,-1.1020315885543823,0.20514202117919922,0.12940187752246857,1.5219348669052124,0.8160069584846497,-0.3532930910587311,0.7066603899002075,-0.26751214265823364,-0.015915008261799812,-0.3229024410247803,-0.43480727076530457,1.156279444694519,0.6378103494644165,-0.020066365599632263,-0.17304591834545135,1.0203648805618286,-0.2192005217075348,0.08299639075994492,0.012773029506206512,0.5476573705673218,0.37844759225845337,0.33381688594818115,-0.4734058976173401,1.4608020782470703,0.6396859884262085,-1.672635793685913,-0.2435745894908905,-0.4471309185028076,0.2532152533531189,0.3919869363307953,0.1516970694065094,0.6877679824829102,-0.9492891430854797,0.22408580780029297,0.6905139684677124,0.2826775014400482,-0.37485212087631226,-0.4576824903488159,0.8299264907836914,-1.3735616207122803,-0.3428383469581604,1.5673867464065552,-0.3584839999675751,-0.046534717082977295,0.513945996761322,-0.2511778473854065,-1.2740360498428345,1.1874754428863525,-1.5312250852584839,-0.17082521319389343,0.00920865312218666,-0.008332163095474243,1.2176320552825928,0.34910908341407776,-0.8817607164382935,-1.201944351196289,0.40171027183532715,1.0045747756958008,-0.6946582794189453,0.023406490683555603,-1.2597399950027466,0.8866069316864014,0.06743167340755463,0.3085015118122101,-0.4853557348251343,0.24277323484420776,0.23133164644241333,-0.6183983683586121,-1.310814619064331,0.4246482253074646,0.023816607892513275,0.0693979263305664,0.34168368577957153,0.5066723227500916,-0.09893377125263214,1.2458072900772095,-1.4212071895599365,-0.16136997938156128,0.9391271471977234,-0.6467017531394958,-0.7001338005065918,0.31245917081832886,0.3627668619155884,0.10393025726079941,-0.1864551603794098,1.4903087615966797,0.20102187991142273,-0.6268331408500671,0.5696490406990051,-0.14184334874153137,-2.154412269592285,0.9595258235931396,0.5076441168785095,-0.5712586641311646,1.0568788051605225,-0.40612760186195374,-1.9035894870758057,1.367762804031372,0.1478389948606491,-0.2837485671043396,-0.822666347026825,-0.949531078338623,-0.8149926066398621,-1.1496917009353638,0.3508298993110657,0.4387024939060211,-0.09263882040977478,0.4982706308364868,0.5689959526062012,-1.262864112854004,0.3166965842247009,0.8581302165985107,-0.13800910115242004,-0.49196794629096985,0.2871648371219635,-0.506128191947937,-0.49682724475860596,-0.03951761871576309,0.2084207832813263,0.8912525177001953,-0.5445371270179749,0.2827420234680176,-0.31144729256629944,-0.8756781220436096,0.5071743726730347,1.4798493385314941,1.492776870727539,-0.37568461894989014,-0.07390531152486801,-0.11133033037185669,-1.1514461040496826,-0.3765983283519745,0.16170233488082886,0.43975144624710083,-0.709698498249054,-0.2849790155887604,-1.4015816450119019,0.5672034621238708,-0.3565294146537781,0.01536754984408617,-0.7240496873855591,0.27389106154441833,-0.03279944881796837,1.0913244485855103,1.323730707168579,-1.2101839780807495,-0.3767339289188385,0.04273302108049393,-1.003711462020874,0.10614994168281555,0.17980565130710602,-0.9967262744903564,-0.10010003298521042,-0.05983496829867363,0.3456302285194397,0.1015046089887619,0.35539543628692627,0.9252163767814636,0.06929607689380646,0.06052611023187637,0.9124881029129028,-0.00928286463022232,1.8790606260299683,-0.46038299798965454,0.5150341987609863,-1.54817533493042,0.2803005874156952,0.3293030261993408,-0.03392290323972702,-0.5230079889297485,-1.1815245151519775,-0.6336435079574585,0.17596016824245453,0.40856313705444336,1.1800694465637207,-0.3462387025356293,-1.101624846458435,0.4027988314628601,-0.08765668421983719,0.03970065712928772,0.4932818114757538,-0.4708987772464752,0.6092181205749512,0.7040153741836548,0.1507781445980072,0.9408414959907532,0.5171549320220947,1.7935454845428467,1.058695673942566,-0.5160757303237915,-1.070348858833313,0.07510734349489212,0.05391696095466614,-0.9822564721107483,0.9467095136642456,1.4091119766235352,-0.5579813718795776,-1.9179415702819824,0.42699378728866577,-1.0877165794372559,0.4413570165634155,0.35965412855148315,-0.27743786573410034,-0.9379875659942627,1.0576748847961426,0.5934585332870483,-1.2514675855636597,1.2038958072662354,0.3920687437057495,-0.7158757448196411,1.2600641250610352,-0.41367506980895996,0.9016873836517334,0.43261462450027466,-1.3777012825012207,0.25758352875709534,-0.10606300085783005,-0.16485397517681122,0.48311182856559753,-0.28285250067710876,0.6404638886451721,-0.3201424777507782,1.1180460453033447,0.6022045016288757,-0.8142102360725403,0.10654547810554504,-1.7154086828231812,-0.5021328926086426,1.0475579500198364,0.48269379138946533,1.0622755289077759,-1.4628301858901978,1.149730920791626,-0.10160385817289352,-0.513382077217102,-0.5839929580688477,-0.8883248567581177,-2.1517059803009033,0.08903893828392029,-0.3388046622276306,-0.7347984910011292,-0.2733967900276184,0.8050891757011414,-1.445361852645874,-1.7464900016784668,0.5970463752746582,0.5388127565383911,1.117830753326416,0.20087596774101257,0.3588525056838989,0.10283955931663513,0.24362368881702423,-0.47604113817214966,0.3384617865085602,-1.2328221797943115,0.3034976124763489,-0.9227777123451233,1.0765100717544556,-0.36558622121810913,0.4948309361934662,0.8783114552497864,0.6682044267654419,-0.2630828320980072,-0.3394998610019684,0.24915699660778046,0.1823045313358307,-1.101784348487854,-0.6071149110794067,-0.08738312870264053,-0.32762399315834045,-0.21824640035629272,-0.6034365892410278,-0.3604806065559387,-0.9324181079864502,-1.0953619480133057,1.0277247428894043,0.09912150353193283,0.8608757257461548,-0.4282948970794678,-0.9290798902511597,0.4759542644023895,-0.8413822650909424,0.4676036536693573,-0.14385195076465607,0.3189265727996826,0.3436775505542755,0.1311556100845337,0.13363870978355408,-0.039983369410037994,0.5840975046157837,0.6230535507202148,-0.6619971990585327,1.41614830493927,-0.3737533688545227,-0.11113257706165314,0.3380632698535919,0.9417853355407715,0.7244082689285278,-1.0803848505020142,2.1109399795532227,-0.1935180276632309,-0.06997045874595642,-1.0112075805664062,-1.8435646295547485,-0.07752980291843414,-1.5499680042266846,0.5859567523002625,0.1735350489616394,0.3894597887992859,-0.5319121479988098,-0.4539511203765869,0.929776132106781]}
[orbitingstar@orbitingstar:~]$ 
SullivanNagler commented 5 days ago

Ok it seems that’s a problem from the version of ollama i’m using : https://github.com/ollama/ollama/issues/6730 Thx for the help. I’ll update when it function correctly

SullivanNagler commented 5 days ago

Even with ollama 0.3.12 the issue persist.

logancyang commented 5 days ago

@SullivanNagler This curl from their example is working for me with api/embeddings.

curl http://localhost:11434/api/embeddings -d '{
  "model": "mxbai-embed-large",
  "prompt": "Llamas are members of the camelid family"
}'

Here's another example

curl http://localhost:11434/api/embed -d '{
  "model": "nomic-embed-text",
  "input": "Why is the sky blue?"
}'

So you can see Ollama has both api/embed and api/embeddings but one has prompt and the other input.

Copilot is using Langchainjs Ollama client so it's using the api/embed endpoint. The issue for your 404 is not the wrong endpoint but something with your setting. You didn't share the screenshot of how you added your custom model so I couldn't tell.

SullivanNagler commented 5 days ago

Okay, i will post on their page. Thx for the help 👍

logancyang commented 5 days ago

Okay, i will post on their page. Thx for the help 👍

Did some searching and updated the above message.

From their doc: https://github.com/ollama/ollama/blob/main/docs/api.md#generate-embeddings

SCR-20241114-lqws
SullivanNagler commented 5 days ago

Oh, i will make a feature request in the nixpkgs for ollama ! Little question, is the plugin working with visual + text model for exemple llama3.2-vision in obsidian ? Thx

logancyang commented 5 days ago

Oh, i will make a feature request in the nixpkgs for ollama ! Little question, is the plugin working with visual + text model for exemple llama3.2-vision in obsidian ? Thx

Not yet, you can make a FR for that!

SullivanNagler commented 5 days ago

I’ve not totaly understand what you sayed about : "how you added your custom model so I couldn't tell." I’ve run "ollama pull nomic-embed-text"

For the archive here the link of the bug request in ollama nixpkgs : https://github.com/NixOS/nixpkgs/pull/354969