Skip to content

Commit

Permalink
Merge pull request #837 from 0xff-dev/main
Browse files Browse the repository at this point in the history
chore: remove WEATHER_API_KEY,BING_KEY environment variable
  • Loading branch information
bjwswang authored Mar 13, 2024
2 parents 647ba0b + 4835882 commit 433ac09
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 13 deletions.
2 changes: 1 addition & 1 deletion deploy/charts/arcadia/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: arcadia
description: A Helm chart(Also a KubeBB Component) for KubeAGI Arcadia
type: application
version: 0.3.10
version: 0.3.11
appVersion: "0.2.0"

keywords:
Expand Down
4 changes: 0 additions & 4 deletions deploy/charts/arcadia/templates/apiserver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@ spec:
fieldPath: metadata.namespace
- name: DEFAULT_CONFIG
value: {{ .Release.Name }}-config
- name: BING_KEY
value: {{ .Values.apiserver.bingKey }}
- name: WEATHER_API_KEY
value: {{ .Values.apiserver.weatherKey }}
command:
- "./apiserver"
args:
Expand Down
2 changes: 0 additions & 2 deletions deploy/charts/arcadia/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ controller:
# @section graphql and bff server
# related project: https://github.com/kubeagi/arcadia/tree/main/apiserver
apiserver:
bingKey: c30e4d7f3ec24c31a489f883616844b5
weatherKey: SDkZmNdUks4-fH1Ii
loglevel: 3
image: kubeagi/arcadia:latest
enableplayground: false
Expand Down
2 changes: 0 additions & 2 deletions pkg/tools/bingsearch/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import (
"fmt"
"net/http"
"net/url"
"os"
"strconv"
"sync"

Expand Down Expand Up @@ -51,7 +50,6 @@ type options struct {

func defaultOptions() options {
return options{
apiKey: os.Getenv("BING_KEY"),
count: 5,
responseFilter: "News,Webpages",
promote: "News,Webpages",
Expand Down
4 changes: 0 additions & 4 deletions pkg/tools/weather/weatherapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ package weather

import (
"context"
"os"
"strings"

"github.com/tmc/langchaingo/callbacks"
Expand All @@ -42,9 +41,6 @@ var _ tools.Tool = Tool{}
// New creates a new weather tool to search on internet
func New(tool *v1alpha1.Tool) (*Tool, error) {
apikey := tool.Params["apiKey"]
if apikey == "" {
apikey = os.Getenv("WEATHER_API_KEY")
}
return &Tool{
client: internal.New(apikey),
}, nil
Expand Down

0 comments on commit 433ac09

Please sign in to comment.