Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
agentchat
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李伟@五瓣科技
agentchat
Commits
7007ba37
Commit
7007ba37
authored
May 28, 2025
by
Wade
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rm comment
parent
64c53496
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
55 deletions
+0
-55
deepseek.go
plugins/deepseek/deepseek.go
+0
-55
No files found.
plugins/deepseek/deepseek.go
View file @
7007ba37
// Copyright 2025 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// SPDX-License-Identifier: Apache-2.0
// Package deepseek provides a Genkit plugin for DeepSeek's API using the go-deepseek client.
package
deepseek
import
(
...
...
@@ -28,9 +11,6 @@ import (
"github.com/firebase/genkit/go/genkit"
deepseek
"github.com/cohesion-org/deepseek-go"
// "github.com/go-deepseek/deepseek"
// "github.com/go-deepseek/deepseek/request"
// "github.com/go-deepseek/deepseek/response"
)
const
provider
=
"deepseek"
...
...
@@ -72,22 +52,6 @@ func (d DeepSeek) Name() string {
}
// Init initializes the plugin.
// Since Ollama models are locally hosted, the plugin doesn't initialize any default models.
// After downloading a model, call [DefineModel] to use it.
// func (o *DeepSeek) Init(ctx context.Context, g *genkit.Genkit) (err error) {
// o.mu.Lock()
// defer o.mu.Unlock()
// if o.initted {
// panic("deepseek.Init already called")
// }
// if o == nil || o.APIKey == "" {
// return errors.New("deepseek : need api key")
// }
// o.initted = true
// return nil
// }
// ModelDefinition represents a model with its name and type.
type
ModelDefinition
struct
{
Name
string
...
...
@@ -127,16 +91,6 @@ func (d *DeepSeek) DefineModel(g *genkit.Genkit, model ModelDefinition, info *ai
return
genkit
.
DefineModel
(
g
,
provider
,
model
.
Name
,
meta
,
gen
.
generate
)
}
// // IsDefinedModel reports whether a model is defined.
// func IsDefinedModel(g *genkit.Genkit, name string) bool {
// return genkit.LookupModel(g, provider, name) != nil
// }
// // Model returns the ai.Model with the given name.
// func Model(g *genkit.Genkit, name string) ai.Model {
// return genkit.LookupModel(g, provider, name)
// }
// Init initializes the DeepSeek plugin.
func
(
d
*
DeepSeek
)
Init
(
ctx
context
.
Context
,
g
*
genkit
.
Genkit
)
error
{
d
.
mu
.
Lock
()
...
...
@@ -149,15 +103,6 @@ func (d *DeepSeek) Init(ctx context.Context, g *genkit.Genkit) error {
return
fmt
.
Errorf
(
"deepseek: need APIKey"
)
}
d
.
initted
=
true
// Define default models.
// defaultModels := []ModelDefinition{
// {Name: deepseek.DeepSeekChat, Type: "chat"}, // deepseek-chat
// {Name: deepseek.DeepSeekReasoner, Type: "chat"}, // deepseek-reasoner
// }
// for _, model := range defaultModels {
// d.DefineModel(g, model, nil)
// }
return
nil
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment