mirror of
https://github.com/xtekky/gpt4free.git
synced 2025-12-24 13:07:53 +08:00
Add OpenRouterFree API key to environment and adjust max_tokens
This commit is contained in:
@@ -16,6 +16,7 @@ DEEPINFRA_API_KEY=
|
|||||||
OPENAI_API_KEY=
|
OPENAI_API_KEY=
|
||||||
GROQ_API_KEY=
|
GROQ_API_KEY=
|
||||||
OPENROUTER_API_KEY=
|
OPENROUTER_API_KEY=
|
||||||
|
OPENROUTERFREE_API_KEY=
|
||||||
OLLAMA_API_KEY=
|
OLLAMA_API_KEY=
|
||||||
NVIDIA_API_KEY=
|
NVIDIA_API_KEY=
|
||||||
PUTER_API_KEY=
|
PUTER_API_KEY=
|
||||||
|
|||||||
@@ -10,12 +10,11 @@ class OpenRouter(OpenaiTemplate):
|
|||||||
working = True
|
working = True
|
||||||
needs_auth = True
|
needs_auth = True
|
||||||
default_model = "openrouter/auto"
|
default_model = "openrouter/auto"
|
||||||
active_by_default = True
|
|
||||||
|
|
||||||
class OpenRouterFree(OpenRouter):
|
class OpenRouterFree(OpenRouter):
|
||||||
parent = "OpenRouter"
|
|
||||||
label = "OpenRouter (free)"
|
label = "OpenRouter (free)"
|
||||||
max_tokens = 5012
|
max_tokens = 4096
|
||||||
|
active_by_default = True
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_models(cls, api_key: str = None, **kwargs):
|
def get_models(cls, api_key: str = None, **kwargs):
|
||||||
|
|||||||
Reference in New Issue
Block a user