mirror of
https://github.com/mudler/LocalAI.git
synced 2026-11-06 12:33:16 -05:00
fix: restore the files that the previous commit removed by mistake
The previous commit was made on a stale base and so reverted work that landed on master before it. This commit puts every file back to the state of its parent's parent. The permission enforcement of the previous commit stays. Assisted-by: Claude:claude-sonnet-5-5 go
This commit is contained in:
158 files changed
+7893
-794
No files matched your search
@@ -0,0 +1,35 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
// Command github is the executable of the GitHub add-on. It reads repositories
|
||||
// for the chats and the agents with a token that the host keeps for the person
|
||||
// and hands over with each call. The add-on stores no token and writes nothing
|
||||
// to GitHub.
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"os"
|
||||
|
||||
"github.com/mudler/LocalAI/addons/github/internal/ghapi"
|
||||
"github.com/mudler/LocalAI/addons/github/internal/platform"
|
||||
"github.com/mudler/LocalAI/addons/github/internal/tools"
|
||||
"github.com/mudler/LocalAI/addons/internal/connector"
|
||||
"github.com/mudler/LocalAI/addons/internal/protocol"
|
||||
"github.com/mudler/LocalAI/pkg/addons/contract"
|
||||
)
|
||||
|
||||
type runtime struct {
|
||||
*tools.Runtime
|
||||
platform platform.Platform
|
||||
}
|
||||
|
||||
func (r runtime) Connector(ctx context.Context, req contract.ConnectorRequest) (contract.ConnectorResponse, error) {
|
||||
return connector.Serve(ctx, r.platform, req)
|
||||
}
|
||||
|
||||
func main() {
|
||||
os.Exit(protocol.Run(os.Args, func(protocol.Startup) contract.Runtime {
|
||||
api := ghapi.New()
|
||||
return runtime{Runtime: tools.New(api), platform: platform.Platform{API: api}}
|
||||
}))
|
||||
}
|
||||
Reference in new issue
Block a user