返回提交历史
Modified
example.env
+1
-0
Modified
g4f/Provider/needs_auth/OpenRouter.py
+2
-3
XFEstudio/gpt4free
Add OpenRouterFree API key to environment and adjust max_tokens
74fcb27c
代码差异
2 个文件
+3
-3
@@ -16,6 +16,7 @@ DEEPINFRA_API_KEY=
16
16
OPENAI_API_KEY=
17
17
GROQ_API_KEY=
18
18
OPENROUTER_API_KEY=
19
OPENROUTERFREE_API_KEY=
19
20
OLLAMA_API_KEY=
20
21
NVIDIA_API_KEY=
21
22
PUTER_API_KEY=
@@ -10,12 +10,11 @@ class OpenRouter(OpenaiTemplate):
10
10
working = True
11
11
needs_auth = True
12
12
default_model = "openrouter/auto"
13
active_by_default = True
14
13
15
14
class OpenRouterFree(OpenRouter):
16
parent = "OpenRouter"
17
15
label = "OpenRouter (free)"
18
max_tokens = 5012
16
max_tokens = 4096
17
active_by_default = True
19
18
20
19
@classmethod
21
20
def get_models(cls, api_key: str = None, **kwargs):