Commit 7007ba37 authored by Wade's avatar Wade

rm comment

parent 64c53496
// 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 package deepseek
import ( import (
...@@ -28,9 +11,6 @@ import ( ...@@ -28,9 +11,6 @@ import (
"github.com/firebase/genkit/go/genkit" "github.com/firebase/genkit/go/genkit"
deepseek "github.com/cohesion-org/deepseek-go" 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" const provider = "deepseek"
...@@ -72,22 +52,6 @@ func (d DeepSeek) Name() string { ...@@ -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. // ModelDefinition represents a model with its name and type.
type ModelDefinition struct { type ModelDefinition struct {
Name string Name string
...@@ -127,16 +91,6 @@ func (d *DeepSeek) DefineModel(g *genkit.Genkit, model ModelDefinition, info *ai ...@@ -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) 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. // Init initializes the DeepSeek plugin.
func (d *DeepSeek) Init(ctx context.Context, g *genkit.Genkit) error { func (d *DeepSeek) Init(ctx context.Context, g *genkit.Genkit) error {
d.mu.Lock() d.mu.Lock()
...@@ -149,15 +103,6 @@ func (d *DeepSeek) Init(ctx context.Context, g *genkit.Genkit) error { ...@@ -149,15 +103,6 @@ func (d *DeepSeek) Init(ctx context.Context, g *genkit.Genkit) error {
return fmt.Errorf("deepseek: need APIKey") return fmt.Errorf("deepseek: need APIKey")
} }
d.initted = true 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 return nil
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment