From 7e2d51221d6e67754c8d1410561de8dce35a4cf1 Mon Sep 17 00:00:00 2001 From: tony Date: Wed, 20 Sep 2023 11:00:19 +0800 Subject: add model config : gpt_35_turbo_0613 --- g4f/models.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'g4f') diff --git a/g4f/models.py b/g4f/models.py index 9b01fa3c..5c1a429b 100644 --- a/g4f/models.py +++ b/g4f/models.py @@ -127,6 +127,10 @@ gpt_35_turbo_16k = Model( base_provider = 'openai', best_provider = Vercel) +gpt_35_turbo_0613 = Model( + name = 'openai:gpt-3.5-turbo-0613', + base_provider = 'openai') + gpt_35_turbo_16k_0613 = Model( name = 'openai:gpt-3.5-turbo-16k-0613', base_provider = 'openai') @@ -215,4 +219,5 @@ class ModelUtils: 'oasst-sft-4-pythia-12b-epoch-3.5' : oasst_sft_4_pythia_12b_epoch_35, 'command-light-nightly' : command_light_nightly, 'gpt-3.5-turbo-16k-0613' : gpt_35_turbo_16k_0613, + 'gpt-3.5-turbo-0613' : gpt_35_turbo_0613, } \ No newline at end of file -- cgit v1.2.3 From 8b5e0fd2619772c5147e517850f18b6659aa0ab7 Mon Sep 17 00:00:00 2001 From: tony Date: Wed, 20 Sep 2023 11:08:11 +0800 Subject: add model config : gpt_35_turbo_0613 --- g4f/models.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'g4f') diff --git a/g4f/models.py b/g4f/models.py index 5c1a429b..caa7e264 100644 --- a/g4f/models.py +++ b/g4f/models.py @@ -129,7 +129,10 @@ gpt_35_turbo_16k = Model( gpt_35_turbo_0613 = Model( name = 'openai:gpt-3.5-turbo-0613', - base_provider = 'openai') + base_provider = 'openai', + best_provider = [ + DeepAi, CodeLinkAva, ChatgptLogin, ChatgptAi, ChatBase, Aivvm + ] gpt_35_turbo_16k_0613 = Model( name = 'openai:gpt-3.5-turbo-16k-0613', -- cgit v1.2.3 From 4772b830d1a665df8c709cc3de22325d65ae93f6 Mon Sep 17 00:00:00 2001 From: tony Date: Wed, 20 Sep 2023 11:09:06 +0800 Subject: add model config : gpt_35_turbo_0613 --- g4f/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'g4f') diff --git a/g4f/models.py b/g4f/models.py index caa7e264..1afc941b 100644 --- a/g4f/models.py +++ b/g4f/models.py @@ -132,7 +132,7 @@ gpt_35_turbo_0613 = Model( base_provider = 'openai', best_provider = [ DeepAi, CodeLinkAva, ChatgptLogin, ChatgptAi, ChatBase, Aivvm - ] + ]) gpt_35_turbo_16k_0613 = Model( name = 'openai:gpt-3.5-turbo-16k-0613', -- cgit v1.2.3 From fa80db85ca08e51da3ec07b8892f475ac000fa06 Mon Sep 17 00:00:00 2001 From: tony Date: Wed, 20 Sep 2023 11:16:42 +0800 Subject: add model config : gpt_35_turbo_0613 --- g4f/models.py | 279 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 141 insertions(+), 138 deletions(-) (limited to 'g4f') diff --git a/g4f/models.py b/g4f/models.py index 1afc941b..703ae598 100644 --- a/g4f/models.py +++ b/g4f/models.py @@ -1,226 +1,229 @@ -from __future__ import annotations +from __future__ import annotations from dataclasses import dataclass -from .typing import Union -from .Provider import BaseProvider -from .Provider import ( +from .typing import Union +from .Provider import BaseProvider +from .Provider import ( ChatgptLogin, CodeLinkAva, - ChatgptAi, - ChatBase, - Vercel, - DeepAi, - Aivvm, - Bard, - H2o + ChatgptAi, + ChatBase, + Vercel, + DeepAi, + Aivvm, + Bard, + H2o, + Yqcloud ) + @dataclass class Model: name: str base_provider: str best_provider: Union[type[BaseProvider], tuple[type[BaseProvider]]] = None + # Config for HuggingChat, OpenAssistant # Works for Liaobots, H2o, OpenaiChat, Yqcloud, You default = Model( - name = "", - base_provider = "huggingface") + name="", + base_provider="huggingface") # GPT-3.5 / GPT-4 gpt_35_turbo = Model( - name = 'gpt-3.5-turbo', - base_provider = 'openai', - best_provider = [ + name='gpt-3.5-turbo', + base_provider='openai', + best_provider=[ DeepAi, CodeLinkAva, ChatgptLogin, ChatgptAi, ChatBase, Aivvm ] ) gpt_4 = Model( - name = 'gpt-4', - base_provider = 'openai') + name='gpt-4', + base_provider='openai') # Bard palm = Model( - name = 'palm', - base_provider = 'google', - best_provider = Bard) + name='palm', + base_provider='google', + best_provider=Bard) # H2o falcon_7b = Model( - name = 'h2oai/h2ogpt-gm-oasst1-en-2048-falcon-7b-v3', - base_provider = 'huggingface', - best_provider = H2o) + name='h2oai/h2ogpt-gm-oasst1-en-2048-falcon-7b-v3', + base_provider='huggingface', + best_provider=H2o) falcon_40b = Model( - name = 'h2oai/h2ogpt-gm-oasst1-en-2048-falcon-40b-v1', - base_provider = 'huggingface', - best_provider = H2o) + name='h2oai/h2ogpt-gm-oasst1-en-2048-falcon-40b-v1', + base_provider='huggingface', + best_provider=H2o) llama_13b = Model( - name = 'h2oai/h2ogpt-gm-oasst1-en-2048-open-llama-13b', - base_provider = 'huggingface', - best_provider = H2o) + name='h2oai/h2ogpt-gm-oasst1-en-2048-open-llama-13b', + base_provider='huggingface', + best_provider=H2o) # Vercel claude_instant_v1 = Model( - name = 'anthropic:claude-instant-v1', - base_provider = 'anthropic', - best_provider = Vercel) + name='anthropic:claude-instant-v1', + base_provider='anthropic', + best_provider=Vercel) claude_v1 = Model( - name = 'anthropic:claude-v1', - base_provider = 'anthropic', - best_provider = Vercel) + name='anthropic:claude-v1', + base_provider='anthropic', + best_provider=Vercel) claude_v2 = Model( - name = 'anthropic:claude-v2', - base_provider = 'anthropic', - best_provider = Vercel) + name='anthropic:claude-v2', + base_provider='anthropic', + best_provider=Vercel) command_light_nightly = Model( - name = 'cohere:command-light-nightly', - base_provider = 'cohere', - best_provider = Vercel) + name='cohere:command-light-nightly', + base_provider='cohere', + best_provider=Vercel) command_nightly = Model( - name = 'cohere:command-nightly', - base_provider = 'cohere', - best_provider = Vercel) + name='cohere:command-nightly', + base_provider='cohere', + best_provider=Vercel) gpt_neox_20b = Model( - name = 'huggingface:EleutherAI/gpt-neox-20b', - base_provider = 'huggingface', - best_provider = Vercel) + name='huggingface:EleutherAI/gpt-neox-20b', + base_provider='huggingface', + best_provider=Vercel) oasst_sft_1_pythia_12b = Model( - name = 'huggingface:OpenAssistant/oasst-sft-1-pythia-12b', - base_provider = 'huggingface', - best_provider = Vercel) + name='huggingface:OpenAssistant/oasst-sft-1-pythia-12b', + base_provider='huggingface', + best_provider=Vercel) oasst_sft_4_pythia_12b_epoch_35 = Model( - name = 'huggingface:OpenAssistant/oasst-sft-4-pythia-12b-epoch-3.5', - base_provider = 'huggingface', - best_provider = Vercel) + name='huggingface:OpenAssistant/oasst-sft-4-pythia-12b-epoch-3.5', + base_provider='huggingface', + best_provider=Vercel) santacoder = Model( - name = 'huggingface:bigcode/santacoder', - base_provider = 'huggingface', - best_provider = Vercel) + name='huggingface:bigcode/santacoder', + base_provider='huggingface', + best_provider=Vercel) bloom = Model( - name = 'huggingface:bigscience/bloom', - base_provider = 'huggingface', - best_provider = Vercel) + name='huggingface:bigscience/bloom', + base_provider='huggingface', + best_provider=Vercel) flan_t5_xxl = Model( - name = 'huggingface:google/flan-t5-xxl', - base_provider = 'huggingface', - best_provider = Vercel) + name='huggingface:google/flan-t5-xxl', + base_provider='huggingface', + best_provider=Vercel) code_davinci_002 = Model( - name = 'openai:code-davinci-002', - base_provider = 'openai', - best_provider = Vercel) + name='openai:code-davinci-002', + base_provider='openai', + best_provider=Vercel) gpt_35_turbo_16k = Model( - name = 'openai:gpt-3.5-turbo-16k', - base_provider = 'openai', - best_provider = Vercel) + name='openai:gpt-3.5-turbo-16k', + base_provider='openai', + best_provider=Vercel) gpt_35_turbo_0613 = Model( - name = 'openai:gpt-3.5-turbo-0613', - base_provider = 'openai', - best_provider = [ - DeepAi, CodeLinkAva, ChatgptLogin, ChatgptAi, ChatBase, Aivvm + name='openai:gpt-3.5-turbo-0613', + base_provider='openai', + best_provider=[ + Yqcloud, Aivvm,ChatgptLogin ]) gpt_35_turbo_16k_0613 = Model( - name = 'openai:gpt-3.5-turbo-16k-0613', - base_provider = 'openai') + name='openai:gpt-3.5-turbo-16k-0613', + base_provider='openai') gpt_4_0613 = Model( - name = 'openai:gpt-4-0613', - base_provider = 'openai', - best_provider = Vercel) + name='openai:gpt-4-0613', + base_provider='openai', + best_provider=Vercel) text_ada_001 = Model( - name = 'openai:text-ada-001', - base_provider = 'openai', - best_provider = Vercel) + name='openai:text-ada-001', + base_provider='openai', + best_provider=Vercel) text_babbage_001 = Model( - name = 'openai:text-babbage-001', - base_provider = 'openai', - best_provider = Vercel) + name='openai:text-babbage-001', + base_provider='openai', + best_provider=Vercel) text_curie_001 = Model( - name = 'openai:text-curie-001', - base_provider = 'openai', - best_provider = Vercel) + name='openai:text-curie-001', + base_provider='openai', + best_provider=Vercel) text_davinci_002 = Model( - name = 'openai:text-davinci-002', - base_provider = 'openai', - best_provider = Vercel) + name='openai:text-davinci-002', + base_provider='openai', + best_provider=Vercel) text_davinci_003 = Model( - name = 'openai:text-davinci-003', - base_provider = 'openai', - best_provider = Vercel) + name='openai:text-davinci-003', + base_provider='openai', + best_provider=Vercel) llama13b_v2_chat = Model( - name = 'replicate:a16z-infra/llama13b-v2-chat', - base_provider = 'replicate', - best_provider = Vercel) + name='replicate:a16z-infra/llama13b-v2-chat', + base_provider='replicate', + best_provider=Vercel) llama7b_v2_chat = Model( - name = 'replicate:a16z-infra/llama7b-v2-chat', - base_provider = 'replicate', - best_provider = Vercel) + name='replicate:a16z-infra/llama7b-v2-chat', + base_provider='replicate', + best_provider=Vercel) class ModelUtils: convert: dict[str, Model] = { # GPT-3.5 / GPT-4 - 'gpt-3.5-turbo' : gpt_35_turbo, - 'gpt-4' : gpt_4, - + 'gpt-3.5-turbo': gpt_35_turbo, + 'gpt-4': gpt_4, + # Bard - 'palm2' : palm, - 'palm' : palm, - 'google' : palm, - 'google-bard' : palm, - 'google-palm' : palm, - 'bard' : palm, - + 'palm2': palm, + 'palm': palm, + 'google': palm, + 'google-bard': palm, + 'google-palm': palm, + 'bard': palm, + # H2o - 'falcon-40b' : falcon_40b, - 'falcon-7b' : falcon_7b, - 'llama-13b' : llama_13b, - + 'falcon-40b': falcon_40b, + 'falcon-7b': falcon_7b, + 'llama-13b': llama_13b, + # Vercel - 'claude-instant-v1' : claude_instant_v1, - 'claude-v1' : claude_v1, - 'claude-v2' : claude_v2, - 'command-nightly' : command_nightly, - 'gpt-neox-20b' : gpt_neox_20b, - 'santacoder' : santacoder, - 'bloom' : bloom, - 'flan-t5-xxl' : flan_t5_xxl, - 'code-davinci-002' : code_davinci_002, - 'gpt-3.5-turbo-16k' : gpt_35_turbo_16k, - 'gpt-4-0613' : gpt_4_0613, - 'text-ada-001' : text_ada_001, - 'text-babbage-001' : text_babbage_001, - 'text-curie-001' : text_curie_001, - 'text-davinci-002' : text_davinci_002, - 'text-davinci-003' : text_davinci_003, - 'llama13b-v2-chat' : llama13b_v2_chat, - 'llama7b-v2-chat' : llama7b_v2_chat, - - 'oasst-sft-1-pythia-12b' : oasst_sft_1_pythia_12b, - 'oasst-sft-4-pythia-12b-epoch-3.5' : oasst_sft_4_pythia_12b_epoch_35, - 'command-light-nightly' : command_light_nightly, - 'gpt-3.5-turbo-16k-0613' : gpt_35_turbo_16k_0613, - 'gpt-3.5-turbo-0613' : gpt_35_turbo_0613, - } \ No newline at end of file + 'claude-instant-v1': claude_instant_v1, + 'claude-v1': claude_v1, + 'claude-v2': claude_v2, + 'command-nightly': command_nightly, + 'gpt-neox-20b': gpt_neox_20b, + 'santacoder': santacoder, + 'bloom': bloom,ChatgptLogin + 'flan-t5-xxl': flan_t5_xxl, + 'code-davinci-002': code_davinci_002, + 'gpt-3.5-turbo-16k': gpt_35_turbo_16k, + 'gpt-4-0613': gpt_4_0613, + 'text-ada-001': text_ada_001, + 'text-babbage-001': text_babbage_001, + 'text-curie-001': text_curie_001, + 'text-davinci-002': text_davinci_002, + 'text-davinci-003': text_davinci_003, + 'llama13b-v2-chat': llama13b_v2_chat, + 'llama7b-v2-chat': llama7b_v2_chat, + + 'oasst-sft-1-pythia-12b': oasst_sft_1_pythia_12b, + 'oasst-sft-4-pythia-12b-epoch-3.5': oasst_sft_4_pythia_12b_epoch_35, + 'command-light-nightly': command_light_nightly, + 'gpt-3.5-turbo-16k-0613': gpt_35_turbo_16k_0613, + 'gpt-3.5-turbo-0613': gpt_35_turbo_0613, + } -- cgit v1.2.3 From 980aee9398a567ed50c3d21ed0414a156d53a006 Mon Sep 17 00:00:00 2001 From: tony Date: Wed, 20 Sep 2023 11:17:49 +0800 Subject: add model config : gpt_35_turbo_0613 --- g4f/models.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'g4f') diff --git a/g4f/models.py b/g4f/models.py index 703ae598..3b5825ff 100644 --- a/g4f/models.py +++ b/g4f/models.py @@ -134,8 +134,7 @@ gpt_35_turbo_0613 = Model( name='openai:gpt-3.5-turbo-0613', base_provider='openai', best_provider=[ - Yqcloud, Aivvm,ChatgptLogin - ]) + Yqcloud, Aivvm,ChatgptLogin]) gpt_35_turbo_16k_0613 = Model( name='openai:gpt-3.5-turbo-16k-0613', @@ -208,7 +207,7 @@ class ModelUtils: 'command-nightly': command_nightly, 'gpt-neox-20b': gpt_neox_20b, 'santacoder': santacoder, - 'bloom': bloom,ChatgptLogin + 'bloom': bloom, 'flan-t5-xxl': flan_t5_xxl, 'code-davinci-002': code_davinci_002, 'gpt-3.5-turbo-16k': gpt_35_turbo_16k, -- cgit v1.2.3 From 9ed50de6778ed891f4d258636deeb745dc01017e Mon Sep 17 00:00:00 2001 From: tony Date: Wed, 20 Sep 2023 11:23:04 +0800 Subject: dd model config : gpt_35_turbo_0613 --- g4f/models.py | 70 +++++++++++++++++++++++++++++------------------------------ 1 file changed, 35 insertions(+), 35 deletions(-) (limited to 'g4f') diff --git a/g4f/models.py b/g4f/models.py index 3b5825ff..9198c433 100644 --- a/g4f/models.py +++ b/g4f/models.py @@ -134,7 +134,7 @@ gpt_35_turbo_0613 = Model( name='openai:gpt-3.5-turbo-0613', base_provider='openai', best_provider=[ - Yqcloud, Aivvm,ChatgptLogin]) + Yqcloud, Aivvm, ChatgptLogin]) gpt_35_turbo_16k_0613 = Model( name='openai:gpt-3.5-turbo-16k-0613', @@ -184,45 +184,45 @@ llama7b_v2_chat = Model( class ModelUtils: convert: dict[str, Model] = { # GPT-3.5 / GPT-4 - 'gpt-3.5-turbo': gpt_35_turbo, - 'gpt-4': gpt_4, + 'gpt-3.5-turbo': gpt_35_turbo, + 'gpt-4': gpt_4, # Bard - 'palm2': palm, - 'palm': palm, - 'google': palm, - 'google-bard': palm, - 'google-palm': palm, - 'bard': palm, + 'palm2': palm, + 'palm': palm, + 'google': palm, + 'google-bard': palm, + 'google-palm': palm, + 'bard': palm, # H2o - 'falcon-40b': falcon_40b, - 'falcon-7b': falcon_7b, - 'llama-13b': llama_13b, + 'falcon-40b': falcon_40b, + 'falcon-7b': falcon_7b, + 'llama-13b': llama_13b, # Vercel - 'claude-instant-v1': claude_instant_v1, - 'claude-v1': claude_v1, - 'claude-v2': claude_v2, - 'command-nightly': command_nightly, - 'gpt-neox-20b': gpt_neox_20b, - 'santacoder': santacoder, - 'bloom': bloom, - 'flan-t5-xxl': flan_t5_xxl, - 'code-davinci-002': code_davinci_002, - 'gpt-3.5-turbo-16k': gpt_35_turbo_16k, - 'gpt-4-0613': gpt_4_0613, - 'text-ada-001': text_ada_001, - 'text-babbage-001': text_babbage_001, - 'text-curie-001': text_curie_001, - 'text-davinci-002': text_davinci_002, - 'text-davinci-003': text_davinci_003, - 'llama13b-v2-chat': llama13b_v2_chat, - 'llama7b-v2-chat': llama7b_v2_chat, - - 'oasst-sft-1-pythia-12b': oasst_sft_1_pythia_12b, + 'claude-instant-v1': claude_instant_v1, + 'claude-v1': claude_v1, + 'claude-v2': claude_v2, + 'command-nightly': command_nightly, + 'gpt-neox-20b': gpt_neox_20b, + 'santacoder': santacoder, + 'bloom': bloom, + 'flan-t5-xxl': flan_t5_xxl, + 'code-davinci-002': code_davinci_002, + 'gpt-3.5-turbo-16k': gpt_35_turbo_16k, + 'gpt-4-0613': gpt_4_0613, + 'text-ada-001': text_ada_001, + 'text-babbage-001': text_babbage_001, + 'text-curie-001': text_curie_001, + 'text-davinci-002': text_davinci_002, + 'text-davinci-003': text_davinci_003, + 'llama13b-v2-chat': llama13b_v2_chat, + 'llama7b-v2-chat': llama7b_v2_chat, + + 'oasst-sft-1-pythia-12b': oasst_sft_1_pythia_12b, 'oasst-sft-4-pythia-12b-epoch-3.5': oasst_sft_4_pythia_12b_epoch_35, - 'command-light-nightly': command_light_nightly, - 'gpt-3.5-turbo-16k-0613': gpt_35_turbo_16k_0613, - 'gpt-3.5-turbo-0613': gpt_35_turbo_0613, + 'command-light-nightly': command_light_nightly, + 'gpt-3.5-turbo-16k-0613': gpt_35_turbo_16k_0613, + 'gpt-3.5-turbo-0613': gpt_35_turbo_0613, } -- cgit v1.2.3 From 6c18bb081f5f308a1cf3f6cdd996c4c17b10c004 Mon Sep 17 00:00:00 2001 From: tony Date: Wed, 20 Sep 2023 11:25:54 +0800 Subject: add model config : gpt_35_turbo_0613 --- g4f/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'g4f') diff --git a/g4f/models.py b/g4f/models.py index 9198c433..62d5650f 100644 --- a/g4f/models.py +++ b/g4f/models.py @@ -34,7 +34,7 @@ gpt_35_turbo = Model( name='gpt-3.5-turbo', base_provider='openai', best_provider=[ - DeepAi, CodeLinkAva, ChatgptLogin, ChatgptAi, ChatBase, Aivvm + DeepAi, CodeLinkAva, ChatgptLogin, ChatgptAi, ChatBase, Aivvm, Yqcloud ] ) -- cgit v1.2.3