You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I propose refactoring these files by moving the tts struct out of localai.go, and creating a new file/struct for each of these endpoints that extends base type OpenAIRequestStruct, and maybe goes into a new file, something like core/schema/openai/image.go,core/schema/openai/tts.go, core/schema/openai/chat.go etc.
That said, it probably isn't that trivial of a refactoring
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi there!
I noticed a seeming inconsistency regarding OpenAI schemas in LocalAI and how they are defined/handled
OpenAI's tts endpoints are in
localai.go
, rather thanopenai.go
as I'd expect:LocalAI/core/schema/localai.go
Lines 17 to 22 in e8f02c0
Meanwhile, the OpenAIRequestStruct is reused in both chat and image endpoints, which is the root cause for #1910
LocalAI/core/schema/openai.go
Lines 108 to 154 in e8f02c0
I propose refactoring these files by moving the tts struct out of
localai.go
, and creating a new file/struct for each of these endpoints that extends base type OpenAIRequestStruct, and maybe goes into a new file, something likecore/schema/openai/image.go
,core/schema/openai/tts.go
,core/schema/openai/chat.go
etc.That said, it probably isn't that trivial of a refactoring
Beta Was this translation helpful? Give feedback.
All reactions