Make it working, expose MCP prepare script to UI

Signed-off-by: mudler <mudler@localai.io>
This commit is contained in:
mudler
2025-04-24 12:31:48 +02:00
parent 9b7344fbdf
commit 34d0954171
8 changed files with 121 additions and 61 deletions

View File

@@ -50,10 +50,10 @@ type options struct {
conversationsPath string
mcpServers []MCPServer
mcpStdioServers []MCPSTDIOServer
mcpBoxURL string
mcpServers []MCPServer
mcpStdioServers []MCPSTDIOServer
mcpBoxURL string
mcpPrepareScript string
newConversationsSubscribers []func(openai.ChatCompletionMessage)
observer Observer
@@ -223,6 +223,13 @@ func WithMCPBoxURL(url string) Option {
}
}
func WithMCPPrepareScript(script string) Option {
return func(o *options) error {
o.mcpPrepareScript = script
return nil
}
}
func WithLLMAPIURL(url string) Option {
return func(o *options) error {
o.LLMAPI.APIURL = url