This repository was archived by the owner on Nov 27, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +8
-12
lines changed Expand file tree Collapse file tree 2 files changed +8
-12
lines changed Original file line number Diff line number Diff line change 1
1
APP_ID =
2
2
APP_SECRET =
3
3
CHATGPT_API_KEY =
4
- CHATGPT_API_URL =
4
+ CHATGPT_API_URL =
5
+ ENABLE_SESSION_FOR_LARK_GROUP = true
Original file line number Diff line number Diff line change 4
4
"log"
5
5
"os"
6
6
7
- "github.com/joho/godotenv"
8
-
9
7
"github.com/bytemate/larkgpt/larkgpt"
10
8
)
11
9
@@ -22,15 +20,12 @@ func main() {
22
20
}
23
21
24
22
func loadConfig () (* larkgpt.ClientConfig , error ) {
25
- err := godotenv .Load (".env" , "../.env" )
26
- if err != nil {
27
- return nil , err
28
- }
29
23
return & larkgpt.ClientConfig {
30
- AppID : os .Getenv ("APP_ID" ),
31
- AppSecret : os .Getenv ("APP_SECRET" ),
32
- ChatGPTAPIKey : os .Getenv ("CHATGPT_API_KEY" ),
33
- ChatGPTAPIURL : os .Getenv ("CHATGPT_API_URL" ),
34
- Maintained : os .Getenv ("MAINTAINED" ) == "true" ,
24
+ AppID : os .Getenv ("APP_ID" ),
25
+ AppSecret : os .Getenv ("APP_SECRET" ),
26
+ ChatGPTAPIKey : os .Getenv ("CHATGPT_API_KEY" ),
27
+ ChatGPTAPIURL : os .Getenv ("CHATGPT_API_URL" ),
28
+ Maintained : os .Getenv ("MAINTAINED" ) == "true" ,
29
+ EnableSessionForLarkGroup : os .Getenv ("ENABLE_SESSION_FOR_LARK_GROUP" ) == "true" ,
35
30
}, nil
36
31
}
You can’t perform that action at this time.
0 commit comments