mirror of
https://github.com/xtekky/gpt4free.git
synced 2025-12-06 02:30:41 -08:00
Track live model instances in Ollama and Cohere providers, updating count on model retrieval
This commit is contained in:
parent
3df3595e63
commit
6607c82d3c
3 changed files with 14 additions and 1 deletions
|
|
@ -15,9 +15,16 @@ class QwenCode(OpenaiTemplate):
|
|||
needs_auth = True
|
||||
active_by_default = True
|
||||
default_model = "qwen3-coder-plus"
|
||||
models = [default_model]
|
||||
client = QwenContentGenerator(QwenOAuth2Client())
|
||||
|
||||
@classmethod
|
||||
def get_models(cls, **kwargs):
|
||||
if not cls.models:
|
||||
cls.models = [cls.default_model]
|
||||
if cls.live == 0 and cls.client.shared_manager.isTokenValid(cls.client.shared_manager.getCurrentCredentials()):
|
||||
cls.live += 1
|
||||
return cls.models
|
||||
|
||||
@classmethod
|
||||
async def create_async_generator(
|
||||
cls,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue