summaryrefslogtreecommitdiffstats
path: root/g4f/Provider/airforce
diff options
context:
space:
mode:
authorHeiner Lohaus <hlohaus@users.noreply.github.com>2024-11-18 15:41:45 +0100
committerHeiner Lohaus <hlohaus@users.noreply.github.com>2024-11-18 15:41:45 +0100
commitf1ef23285ae6e63d5fb28f5e271fec0e40ad65f2 (patch)
tree78134cfed60c8facbcccf200e3cbdb65fba35d85 /g4f/Provider/airforce
parentUpdate Blackbox.py (diff)
downloadgpt4free-f1ef23285ae6e63d5fb28f5e271fec0e40ad65f2.tar
gpt4free-f1ef23285ae6e63d5fb28f5e271fec0e40ad65f2.tar.gz
gpt4free-f1ef23285ae6e63d5fb28f5e271fec0e40ad65f2.tar.bz2
gpt4free-f1ef23285ae6e63d5fb28f5e271fec0e40ad65f2.tar.lz
gpt4free-f1ef23285ae6e63d5fb28f5e271fec0e40ad65f2.tar.xz
gpt4free-f1ef23285ae6e63d5fb28f5e271fec0e40ad65f2.tar.zst
gpt4free-f1ef23285ae6e63d5fb28f5e271fec0e40ad65f2.zip
Diffstat (limited to 'g4f/Provider/airforce')
-rw-r--r--g4f/Provider/airforce/AirforceChat.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/g4f/Provider/airforce/AirforceChat.py b/g4f/Provider/airforce/AirforceChat.py
index cec911a3..e94dd0a8 100644
--- a/g4f/Provider/airforce/AirforceChat.py
+++ b/g4f/Provider/airforce/AirforceChat.py
@@ -50,11 +50,13 @@ class AirforceChat(AsyncGeneratorProvider, ProviderModelMixin):
supports_message_history = True
default_model = 'llama-3.1-70b-chat'
- response = requests.get('https://api.airforce/models')
- data = response.json()
- text_models = [model['id'] for model in data['data']]
- models = [*text_models]
+ @classmethod
+ def get_models(cls) -> list:
+ if not cls.models:
+ response = requests.get('https://api.airforce/models')
+ data = response.json()
+ cls.models = [model['id'] for model in data['data']]
model_aliases = {
# openchat