Skip to content

Commit

Permalink
refactor(g4f/Provider/Blackbox.py): Streamline model configuration an…
Browse files Browse the repository at this point in the history
…d improve response handling
  • Loading branch information
kqlio67 committed Nov 20, 2024
1 parent de45af1 commit 4d1dfa8
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion g4f/Provider/Blackbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,17 @@ class Blackbox(AsyncGeneratorProvider, ProviderModelMixin):
'builder Agent': {'mode': True, 'id': "builder Agent"},
}

model_prefixes = {mode: f"@{value['id']}" for mode, value in trendingAgentMode.items() if mode not in ["gemini-1.5-flash", "llama-3.1-8b", "llama-3.1-70b", "llama-3.1-405b", "repomap"]}
additional_prefixes = {
'gpt-4o': '@gpt-4o',
'gemini-pro': '@gemini-pro',
'claude-sonnet-3.5': '@claude-sonnet'
}

model_prefixes = {
**{mode: f"@{value['id']}" for mode, value in trendingAgentMode.items()
if mode not in ["gemini-1.5-flash", "llama-3.1-8b", "llama-3.1-70b", "llama-3.1-405b", "repomap"]},
**additional_prefixes
}


models = list(dict.fromkeys([default_model, *userSelectedModel, *list(agentMode.keys()), *list(trendingAgentMode.keys())]))
Expand Down

0 comments on commit 4d1dfa8

Please sign in to comment.