Skip to content

Commit

Permalink
Merge pull request #3 from tomkat-cr/GS-154_post_hackathon_fixes
Browse files Browse the repository at this point in the history
GS-154 - Fix available providers and "status:" attribute
  • Loading branch information
tomkat-cr authored Nov 20, 2024
2 parents 501cbdf + 82ba5ba commit e0e2d9e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 13 deletions.
26 changes: 13 additions & 13 deletions config/app_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,36 +26,36 @@
"REFINE_VIDEO_PROMPT_TEXT": "[refine_video_prompt.txt]",
"REFINE_LLM_PROMPT_TEXT": "[refine_llm_prompt.txt]",
"LLM_PROVIDERS": {
"together_ai": {
"requirements": ["TOGETHER_AI_API_KEY"],
"active": true
},
"openai": {
"requirements": ["OPENAI_API_KEY"]
},
"groq": {
"requirements": ["GROQ_API_KEY"],
"active:": true
"active": true
},
"ollama": {
"requirements": [],
"active:": true
"active": false
},
"rhymes": {
"requirements": ["RHYMES_ARIA_API_KEY"],
"active:": true
"active": true
},
"nvidia": {
"requirements": ["NVIDIA_API_KEY"],
"active:": true
"active": true
},
"huggingface": {
"requirements": ["HUGGINGFACE_API_KEY"],
"active:": true
},
"together_ai": {
"requirements": ["TOGETHER_AI_API_KEY"],
"active:": true
"active": true
},
"xai": {
"requirements": ["XAI_API_KEY"],
"active:": true
"active": true
}
},
"NO_SYSTEM_PROMPT_ALLOWED_PROVIDERS": [
Expand Down Expand Up @@ -104,11 +104,11 @@
"TEXT_TO_IMAGE_PROVIDERS": {
"huggingface": {
"requirements": ["HUGGINGFACE_API_KEY"],
"active:": true
"active": true
},
"openai": {
"requirements": ["OPENAI_API_KEY"],
"active:": true
"active": true
}
},
"TEXT_TO_IMAGE_AVAILABLE_MODELS": {
Expand All @@ -124,7 +124,7 @@
"TEXT_TO_VIDEO_PROVIDERS": {
"rhymes": {
"requirements": ["RHYMES_ALLEGRO_API_KEY"],
"active:": true
"active": true
}
},
"TEXT_TO_VIDEO_AVAILABLE_MODELS": {
Expand Down
6 changes: 6 additions & 0 deletions lib/codegen_streamlit_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -1092,6 +1092,12 @@ def get_available_ai_providers(
param_values = os.environ
result = []
for model_name, model_attr in self.get_par_value(param_name).items():
# log_debug(f"get_available_ai_providers | "
# '\nmodel_attr.get("active", True): '
# f'{model_attr.get("active", True)}'
# f"\nmodel_name: {model_name} | "
# f"\nmodel_attr: {model_attr}",
# debug=DEBUG)
if not model_attr.get("active", True):
continue
model_to_add = model_name
Expand Down

0 comments on commit e0e2d9e

Please sign in to comment.