Closed 35develr closed 9 months ago
~Can you provide debug message from localai as well?~
Edit: https://github.com/nextcloud/integration_openai/issues/65 It seems there are some breaking changes in localai which make it not fully compatible with openai api endpoint.
https://github.com/mudler/LocalAI/blob/23eced1644695ad4de7306eee63521b4220a801c/api/schema/openai.go#L92 Can you try by removing the following line? https://github.com/hibobmaster/matrix_chatgpt_bot/blob/f4d7b9212a1256c76335eab0900bc839eb6f6ee9/src/imagegen.py#L22
There is no parameter "n" in localai v2.
My Error is not related to "n" but to OpenAIRequest.response_format
i tried to remove the line 24 "response_format": "b64_json",
then: docker compose up -d --build --force-recreate
but this crashed my docker image ;-/
The other thing is: stablediffusion in localai gives me *.png
the response is looking like this:
{"created":1703144083,"id":"0a7b85d9-45b2-4211-a361-5e3f3a598cc3","data":[{"embedding":null,"index":0,"url":"http://localhost:8080/generated-images/b642730922674.png"}],"usage":{"prompt_tokens":0,"completion_tokens":0,"total_tokens":0}}
all i get is the link to the url of the image.
I will solve this maybe in tomorrow.
v1.5.0 solve this problem, use "image_generation_backend": "localai"
.
https://github.com/hibobmaster/matrix_chatgpt_bot/commit/fac14a42447ae681996efb8222fdd9a06a1370bc
on LocalAi stablediffusion is running and working.
matrix_chatgpt_bot Config: (XXXXed out my credentials)
Log: