undreamai / LLMUnity

Create characters in Unity with LLMs!
https://undream.ai
MIT License
674 stars 70 forks source link

Server could not be started! #70

Closed fromparis closed 9 months ago

fromparis commented 9 months ago

Describe the bug

on Mac, build setting IOS :

loaded mistral

/Assets/StreamingAssets/llamafile-0.6/bin/llamafile: line 38: mkdir: No such file or directory UnityEngine.Debug:LogError (object) LLMUnity.LLM:DebugLog (string,bool) (at ./Library/PackageCache/ai.undream.llmunity@641ba238a4/Runtime/LLM.cs:155) LLMUnity.LLM:ProcessError (string) (at ./Library/PackageCache/ai.undream.llmunity@641ba238a4/Runtime/LLM.cs:162) LLMUnity.LLMUnitySetup/<>c__DisplayClass0_0:b__1 (object,System.Diagnostics.DataReceivedEventArgs) (at ./Library/PackageCache/ai.undream.llmunity@641ba238a4/Runtime/LLMUnitySetup.cs:46) System.Threading._ThreadPoolWaitCallback:PerformWaitCallback ()

Exception: Server could not be started! LLMUnity.LLM.StartLLMServer () (at ./Library/PackageCache/ai.undream.llmunity@641ba238a4/Runtime/LLM.cs:272) LLMUnity.LLM.Awake () (at ./Library/PackageCache/ai.undream.llmunity@641ba238a4/Runtime/LLM.cs:117)

Steps to reproduce

No response

LLMUnity version

unity 2022

Operating System

macOs

amakropoulos commented 9 months ago

hi, thanks for the report! can you install the Xcode command line tools and try again?

Martin80 commented 9 months ago

Hi. It seems the issue exists in v1.0.6, too (Windows 10, Unity)

Exception: Server could not be started! LLMUnity.LLM.StartLLMServer () (at ./Library/PackageCache/ai.undream.llmunity@2c98af5493/Runtime/LLM.cs:273) LLMUnity.LLM.Awake () (at ./Library/PackageCache/ai.undream.llmunity@2c98af5493/Runtime/LLM.cs:117)

amakropoulos commented 9 months ago

Hi Martin80, the issue above was specific to Mac. Would you mind joining on discord to do some debugging together? https://discord.gg/RwXKQb6zdv

flashup commented 8 months ago

Hello, I have similar problem. Mac, Unity 2022.3.17.

Exception: Server could not be started!
LLMUnity.LLM.StartLLMServer () (at ./Library/PackageCache/ai.undream.llmunity@372ca3f038/Runtime/LLM.cs:273)
LLMUnity.LLM.Awake () (at ./Library/PackageCache/ai.undream.llmunity@372ca3f038/Runtime/LLM.cs:117)

But if I manually run the server command from logs in terminal:

Server command: sh -c "/Users/.../Assets/StreamingAssets/llamafile-0.6/bin/llamafile  --port 13333 -m /Users/.../Assets/StreamingAssets/minicpm-2b-sft-bf16.Q4_K_M.gguf -c 512 -b 512 --log-disable --nobrowser -np 1"

After that the server starts from Unity properly.

amakropoulos commented 8 months ago

That's really strange. Is it on the latest release, 1.0.6? If it runs on command line I don't see why it fails on Unity. Do you see any other error before that?

flashup commented 8 months ago

@amakropoulos yes, library is updated. I can't repeat this bug anymore, I tried to reinstall the library and download new models. Everything works after I run command in terminal. I saw that there was some progress line in terminal in the first run, like it was downloading something. But unfortunately I didn't save the logs =(

amakropoulos commented 8 months ago

Interesting, thanks for letting me know! There was another user that reported something similar with mac, I'll keep it in mind.