mirror of
https://github.com/xtekky/gpt4free.git
synced 2026-04-22 23:57:17 +08:00
Fix add user in Nvidia
This commit is contained in:
@@ -12,4 +12,5 @@ class Nvidia(OpenaiTemplate):
|
||||
active_by_default = True
|
||||
needs_auth = True
|
||||
models_needs_auth = True
|
||||
default_model = DEFAULT_MODEL
|
||||
default_model = DEFAULT_MODEL
|
||||
add_user = False
|
||||
@@ -26,6 +26,7 @@ class OpenaiTemplate(AsyncGeneratorProvider, ProviderModelMixin, RaiseErrorMixin
|
||||
models_needs_auth = False
|
||||
use_model_names = False
|
||||
ssl = None
|
||||
add_user = True
|
||||
|
||||
@classmethod
|
||||
def get_models(cls, api_key: str = None, api_base: str = None) -> list[str]:
|
||||
@@ -129,7 +130,7 @@ class OpenaiTemplate(AsyncGeneratorProvider, ProviderModelMixin, RaiseErrorMixin
|
||||
top_p=top_p,
|
||||
stop=stop,
|
||||
stream="audio" not in extra_parameters if stream is None else stream,
|
||||
user=user,
|
||||
user=user if cls.add_user else None,
|
||||
**extra_parameters,
|
||||
**extra_body
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user