diff --git a/AutoGroq/configs/config_local.py.example b/AutoGroq/configs/config_local.py.example deleted file mode 100644 index 49eb517c..00000000 --- a/AutoGroq/configs/config_local.py.example +++ /dev/null @@ -1,13 +0,0 @@ -# User-specific configurations - -LLM_PROVIDER = "anthropic" -ANTHROPIC_API_URL = "https://api.anthropic.com/v1/messages" -GROQ_API_URL = "https://api.groq.com/openai/v1/chat/completions" -LMSTUDIO_API_URL = "http://localhost:1234/v1/chat/completions" -OLLAMA_API_URL = "http://127.0.0.1:11434/api/generate" -# OPENAI_API_KEY = "your_openai_api_key" -OPENAI_API_URL = "https://api.openai.com/v1/chat/completions" - -DEBUG = True - -RETRY_DELAY = 2 \ No newline at end of file diff --git a/AutoGroq/tools/__init__.py b/AutoGroq/tools/__init__.py new file mode 100644 index 00000000..330f66ce --- /dev/null +++ b/AutoGroq/tools/__init__.py @@ -0,0 +1,3 @@ +""" +This module contains various tools used by the AutoGroq system. +""" \ No newline at end of file diff --git a/AutoGroq/utils/ui_utils.py b/AutoGroq/utils/ui_utils.py index b13c9a27..59b328cd 100644 --- a/AutoGroq/utils/ui_utils.py +++ b/AutoGroq/utils/ui_utils.py @@ -755,11 +755,7 @@ def rephrase_prompt(user_request, model, max_tokens=None, llm_provider=None, pro def select_model(): provider = st.session_state.get('provider', LLM_PROVIDER) - - if 'available_models' not in st.session_state or not st.session_state.available_models: - fetch_available_models(provider) - - provider_models = st.session_state.available_models + provider_models = get_provider_models(provider) if not provider_models: st.warning(f"No models available for {provider}. Please check your API key and connection.") @@ -796,7 +792,8 @@ def select_provider(): update_api_url(selected_provider) # Clear any existing warnings - st.session_state.warning_placeholder.empty() + if 'warning_placeholder' in st.session_state: + st.session_state.warning_placeholder.empty() # Check for API key and prompt if not found api_key = get_api_key(selected_provider) @@ -846,28 +843,26 @@ def update_temperature(value): def show_interfaces(): - st.markdown('