Spaces:
Running
Running
Commit
·
02885ef
1
Parent(s):
67eec5b
adding llms
Browse files- app/variables.py +16 -3
app/variables.py
CHANGED
|
@@ -124,6 +124,7 @@ style_choice_columns = {'Manager Type': style_options['Manager Type']['property'
|
|
| 124 |
|
| 125 |
from langchain_openai import ChatOpenAI
|
| 126 |
import streamlit as st
|
|
|
|
| 127 |
|
| 128 |
## dockerized streamlit app wants to read from os.getenv(), otherwise use st.secrets
|
| 129 |
import os
|
|
@@ -131,8 +132,20 @@ api_key = os.getenv("NRP_API_KEY")
|
|
| 131 |
if api_key is None:
|
| 132 |
api_key = st.secrets["NRP_API_KEY"]
|
| 133 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 134 |
llm_options = {
|
| 135 |
-
"
|
| 136 |
-
"
|
| 137 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 138 |
}
|
|
|
|
| 124 |
|
| 125 |
from langchain_openai import ChatOpenAI
|
| 126 |
import streamlit as st
|
| 127 |
+
from langchain_openai.chat_models.base import BaseChatOpenAI
|
| 128 |
|
| 129 |
## dockerized streamlit app wants to read from os.getenv(), otherwise use st.secrets
|
| 130 |
import os
|
|
|
|
| 132 |
if api_key is None:
|
| 133 |
api_key = st.secrets["NRP_API_KEY"]
|
| 134 |
|
| 135 |
+
openrouter_api = os.getenv("OPENROUTER_API_KEY")
|
| 136 |
+
if openrouter_api is None:
|
| 137 |
+
openrouter_api = st.secrets["OPENROUTER_API_KEY"]
|
| 138 |
+
|
| 139 |
llm_options = {
|
| 140 |
+
"mistral-small-3.2-24b-instruct": ChatOpenAI(model = "mistralai/mistral-small-3.2-24b-instruct:free", api_key=openrouter_api, base_url = "https://openrouter.ai/api/v1", temperature=0),
|
| 141 |
+
"devstral-small-2505": ChatOpenAI(model = "mistralai/devstral-small-2505:free", api_key=openrouter_api, base_url = "https://openrouter.ai/api/v1", temperature=0),
|
| 142 |
+
"gpt-oss-20b": ChatOpenAI(model = "openai/gpt-oss-20b:free", api_key=openrouter_api, base_url = "https://openrouter.ai/api/v1", temperature=0),
|
| 143 |
+
"deepseek-r1t2-chimera": ChatOpenAI(model = "tngtech/deepseek-r1t2-chimera:free", api_key=openrouter_api, base_url = "https://openrouter.ai/api/v1", temperature=0),
|
| 144 |
+
"kimi-dev-72b": ChatOpenAI(model = "moonshotai/kimi-dev-72b:free", api_key=openrouter_api, base_url = "https://openrouter.ai/api/v1", temperature=0),
|
| 145 |
+
"hunyuan-a13b-instruct": ChatOpenAI(model = "tencent/hunyuan-a13b-instruct:free", api_key=openrouter_api, base_url = "https://openrouter.ai/api/v1", temperature=0),
|
| 146 |
+
"olmo": ChatOpenAI(model = "olmo", api_key=api_key, base_url = "http://ellm.nrp-nautilus.io/", temperature=0),
|
| 147 |
+
"llama3": ChatOpenAI(model = "llama3", api_key=api_key, base_url = "http://ellm.nrp-nautilus.io/", temperature=0),
|
| 148 |
+
"qwen3": ChatOpenAI(model = "qwen3", api_key=api_key, base_url = "http://ellm.nrp-nautilus.io/", temperature=0),
|
| 149 |
+
"gemma3": ChatOpenAI(model = "gemma3", api_key=api_key, base_url = "http://ellm.nrp-nautilus.io/", temperature=0),
|
| 150 |
+
|
| 151 |
}
|