Skip to content

Commit

Permalink
Merge pull request #1978 from hlohaus/leech
Browse files Browse the repository at this point in the history
Update model list / providers
  • Loading branch information
hlohaus committed May 19, 2024
2 parents 4359436 + 1994481 commit 23b27ce
Show file tree
Hide file tree
Showing 8 changed files with 75 additions and 143 deletions.
2 changes: 1 addition & 1 deletion g4f/Provider/Cohere.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

class Cohere(AbstractProvider):
url = "https://cohereforai-c4ai-command-r-plus.hf.space"
working = True
working = False
supports_gpt_35_turbo = False
supports_gpt_4 = False
supports_stream = True
Expand Down
7 changes: 5 additions & 2 deletions g4f/Provider/DuckDuckGo.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@ class DuckDuckGo(AsyncGeneratorProvider, ProviderModelMixin):
supports_message_history = True

default_model = "gpt-3.5-turbo-0125"
models = ["gpt-3.5-turbo-0125", "claude-instant-1.2"]
model_aliases = {"gpt-3.5-turbo": "gpt-3.5-turbo-0125"}
models = ["gpt-3.5-turbo-0125", "claude-3-haiku-20240307"]
model_aliases = {
"gpt-3.5-turbo": "gpt-3.5-turbo-0125",
"claude-3-haiku": "claude-3-haiku-20240307"
}

status_url = "https://duckduckgo.com/duckchat/v1/status"
chat_url = "https://duckduckgo.com/duckchat/v1/chat"
Expand Down
2 changes: 1 addition & 1 deletion g4f/Provider/Llama.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

class Llama(AsyncGeneratorProvider, ProviderModelMixin):
url = "https://www.llama2.ai"
working = True
working = False
supports_message_history = True
default_model = "meta/meta-llama-3-70b-instruct"
models = [
Expand Down
7 changes: 5 additions & 2 deletions g4f/Provider/PerplexityLabs.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,14 @@ class PerplexityLabs(AsyncGeneratorProvider, ProviderModelMixin):
"related"
]
model_aliases = {
"mistralai/Mistral-7B-Instruct-v0.1": "mistral-7b-instruct",
"mistralai/Mistral-7B-Instruct-v0.1": "mistral-7b-instruct",
"mistralai/Mistral-7B-Instruct-v0.2": "mistral-7b-instruct",
"mistralai/Mixtral-8x7B-Instruct-v0.1": "mixtral-8x7b-instruct",
"codellama/CodeLlama-70b-Instruct-hf": "codellama-70b-instruct",
"llava-v1.5-7b": "llava-v1.5-7b-wrapper",
'databricks/dbrx-instruct': "dbrx-instruct"
"databricks/dbrx-instruct": "dbrx-instruct",
"meta-llama/Meta-Llama-3-70B-Instruct": "llama-3-70b-instruct",
"meta-llama/Meta-Llama-3-8B-Instruct": "llama-3-8b-instruct"
}

@classmethod
Expand Down
2 changes: 1 addition & 1 deletion g4f/Provider/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from __future__ import annotations

from ..providers.types import BaseProvider, ProviderType
from ..providers.retry_provider import RetryProvider, IterProvider
from ..providers.retry_provider import RetryProvider, IterListProvider
from ..providers.base_provider import AsyncProvider, AsyncGeneratorProvider
from ..providers.create_images import CreateImagesProvider

Expand Down
3 changes: 2 additions & 1 deletion g4f/Provider/needs_auth/OpenaiChat.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,7 @@ async def create_async_generator(
except NoValidHarFileError as e:
if cls._api_key is None and cls.needs_auth:
raise e
cls._create_request_args()

if cls.default_model is None:
cls.default_model = cls.get_model(await cls.get_default_model(session, cls._headers))
Expand Down Expand Up @@ -420,7 +421,7 @@ async def create_async_generator(
**requirements["proofofwork"],
user_agent=cls._headers["user-agent"],
proofTokens=proofTokens
)
)
if debug.logging:
print(
'Arkose:', False if not need_arkose else arkose_token[:12]+"...",
Expand Down
Loading

0 comments on commit 23b27ce

Please sign in to comment.