gitdeem commited on
Commit
72f34ec
·
verified ·
1 Parent(s): 9b0be30

Upload 3 files

Browse files
Files changed (3) hide show
  1. Dockerfile +19 -0
  2. README.md +10 -10
  3. config.yaml +85 -0
Dockerfile ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM golang:1.21-alpine AS builder
2
+
3
+ WORKDIR /app
4
+ RUN apk add git make && git clone https://github.com/bincooo/chatgpt-adapter.git .
5
+ RUN make build-linux
6
+
7
+ FROM ubuntu:latest
8
+
9
+ WORKDIR /app
10
+ COPY --from=builder /app/bin/linux/server ./server
11
+
12
+ ADD config.yaml .
13
+ RUN mkdir log \
14
+ && chmod +x server \
15
+ && chmod 777 log
16
+
17
+ ENV ARG "--port 7860"
18
+ CMD ["./server ${ARG}"]
19
+ ENTRYPOINT ["sh", "-c"]
README.md CHANGED
@@ -1,10 +1,10 @@
1
- ---
2
- title: Adapter
3
- emoji: 🦀
4
- colorFrom: pink
5
- colorTo: pink
6
- sdk: docker
7
- pinned: false
8
- ---
9
-
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
+ ---
2
+ title: adapter
3
+ emoji: 🌍
4
+ colorFrom: blue
5
+ colorTo: pink
6
+ sdk: docker
7
+ pinned: false
8
+ license: mit
9
+ ---
10
+
config.yaml ADDED
@@ -0,0 +1,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # 内部转发请求配置,0值为无超时 单位为秒
2
+ # connTimeout: 用户连接超时
3
+ # idleConnTimeout: 空闲连接超时
4
+ # responseHeaderTimeout: 响应头超时
5
+ server-conn:
6
+ connTimeout: 0
7
+ idleConnTimeout: 0
8
+ responseHeaderTimeout: 0
9
+
10
+ white-addr:
11
+ # - '127.0.0.1'
12
+ # - 'xxx.xxx.xxx.xxx'
13
+
14
+ # 开启特殊标记增强
15
+ flags: true
16
+
17
+ # 图片访问
18
+ domain: "https://deeme-adapter.hf.space"
19
+
20
+ # 内调llm,用于绘图时文本转tags
21
+ llm:
22
+ baseUrl: "http://127.0.0.1:8081"
23
+ model: "command-r-plus"
24
+ token: "kUbPWLagtquZkTAp9y3c4aFqDMRMmLMLuiXZNSVs"
25
+
26
+ # lmsys fn、 trigger
27
+ lmsys: [49 , 109]
28
+
29
+ # hf 绘图接口配置化
30
+ hf:
31
+ # dalle-4k: https://mukaist-dalle-4k.hf.space
32
+ # animagine-xl-3.1: https://cagliostrolab-animagine-xl-3-1.hf.space
33
+ # dalle-3-xl: https://ehristoforu-dalle-3-xl-lora-v2.hf.space
34
+
35
+ # gemini 自定义安全设置
36
+ google:
37
+ # safes:
38
+ # - category: HARM_CATEGORY_HARASSMENT
39
+ # threshold: BLOCK_NONE
40
+
41
+ bing:
42
+ baseUrl: "https://edgeservices.bing.com/edgesvc"
43
+
44
+ serverless:
45
+ enabled: false
46
+ disabled-gpu: true
47
+ # 当无法找到指定的浏览器时可以在此配置路径
48
+ # execPath: /usr/bin/microsoft-edge
49
+ headless: new
50
+
51
+ interpreter:
52
+ baseUrl: http://127.0.0.1:8000
53
+ echoCode: true
54
+ ws: true
55
+
56
+ custom-llm:
57
+ baseUrl: http://127.0.0.1:8080
58
+
59
+ # toolCall 默认配置化; 在 flags 关闭时也可用
60
+ toolCall:
61
+ id: -1
62
+ enabled: false
63
+ tasks: false
64
+
65
+ # 图片放大,domain需要公网可访问的地址
66
+ # key请到https://bigjpg.com获取,每月30次免费
67
+ # 目前注册没有限制,可配置多个key轮询
68
+ #magnify:
69
+ # - "xxx"
70
+
71
+ ######################
72
+ # router
73
+ port: 7860
74
+ timeout: 300
75
+ mappers:
76
+ - addr: http://127.0.0.1:8444
77
+ routes:
78
+ - path: ^/clewd/(.+)
79
+ rewrite: /$1
80
+ - addr: http://127.0.0.1:8081
81
+ routes:
82
+ - path: ^/proxies/(.+)
83
+ rewrite: /$1
84
+ - path: ^/file/(.+)
85
+ rewrite: /file/$1