Skip to content

Commit c1d72dd

Browse files
authored
Testbed tokens (#301)
* Fix max_token issue
1 parent cd3e58e commit c1d72dd

File tree

3 files changed

+40
-41
lines changed

3 files changed

+40
-41
lines changed

pyproject.toml

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ dependencies = [
1717
"langchain-core==0.3.78",
1818
"httpx==0.28.1",
1919
"oracledb~=3.1",
20-
"plotly==6.3.0",
20+
"plotly==6.3.1",
2121
]
2222

2323
[project.optional-dependencies]
@@ -26,29 +26,27 @@ server = [
2626
"bokeh==3.8.0",
2727
"evaluate==0.4.6",
2828
"faiss-cpu==1.12.0",
29-
"fastapi==0.118.1",
29+
"fastapi==0.118.2",
3030
"fastmcp==2.12.4",
3131
"giskard==2.18.0",
32-
"langchain-anthropic==0.3.21",
33-
"langchain-aws==0.2.35",
32+
"langchain-aimlapi==0.1.0",
3433
"langchain-cohere==0.4.6",
3534
"langchain-community==0.3.31",
36-
"langchain-deepseek==0.1.4",
35+
"langchain-fireworks==0.3.0",
3736
"langchain-google-genai==2.1.12",
38-
"langchain-google-vertexai==2.1.2",
39-
"langchain-groq==0.3.8",
40-
"langchain-huggingface==0.3.1",
41-
"langchain-mistralai==0.2.12",
37+
"langchain-ibm==0.3.18",
4238
"langchain-mcp-adapters==0.1.11",
39+
"langchain-mistralai==0.2.12",
40+
"langchain-nomic==0.1.5",
41+
"langchain-oci==0.1.5",
4342
"langchain-ollama==0.3.10",
4443
"langchain-openai==0.3.35",
45-
"langchain-perplexity==0.1.2",
46-
"langchain-xai==0.2.5",
47-
"langgraph==0.6.9",
44+
"langchain-together==0.3.1",
45+
"langgraph==0.6.8",
4846
"litellm==1.77.7",
4947
"llama-index==0.14.4",
5048
"lxml==6.0.2",
51-
"matplotlib==3.10.6",
49+
"matplotlib==3.10.7",
5250
"oci~=2.0",
5351
"psutil==7.1.0",
5452
"python-multipart==0.0.20",

src/client/content/testbed.py

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -379,41 +379,41 @@ def render_existing_testset_ui(testset_sources: list) -> tuple[str, str, str, bo
379379

380380
def process_testset_request(endpoint: str, api_params: dict, testset_source: str = None) -> None:
381381
"""Process testset loading/generation request"""
382-
with st.spinner("Processing Q&A... please be patient.", show_time=True):
383-
if testset_source != "Database":
384-
api_params["name"] = (state.testbed["testset_name"],)
385-
files = st_common.local_file_payload(state[f"selected_uploader_{state.testbed['uploader_key']}"])
386-
api_payload = {"files": files}
387-
try:
382+
try:
383+
with st.spinner("Processing Q&A... please be patient.", show_time=True):
384+
if testset_source != "Database":
385+
api_params["name"] = (state.testbed["testset_name"],)
386+
files = st_common.local_file_payload(state[f"selected_uploader_{state.testbed['uploader_key']}"])
387+
api_payload = {"files": files}
388388
response = api_call.post(endpoint=endpoint, params=api_params, payload=api_payload, timeout=3600)
389389
get_testbed_db_testsets.clear()
390390
state.testbed_db_testsets = get_testbed_db_testsets()
391391
state.testbed["testset_id"] = next(
392392
(d["tid"] for d in state.testbed_db_testsets if d.get("name") == state.testbed["testset_name"]),
393393
None,
394394
)
395-
except api_call.ApiError as ex:
396-
st.error(f"Error Generating TestSet: {ex}", icon="🚨")
397-
st.stop()
398-
except (ValueError, KeyError, TypeError) as ex:
399-
logger.error("Exception: %s", ex)
400-
st.error(f"Looks like you found a bug: {ex}", icon="🚨")
401-
st.stop()
402-
else:
403-
# Set required state from splitting selected DB TestSet
404-
testset_name, testset_created = state.selected_db_testset.split(" -- Created: ", 1)
405-
state.testbed["testset_name"] = testset_name
406-
state.testbed["testset_id"] = next(
407-
(
408-
d["tid"]
409-
for d in state.testbed_db_testsets
410-
if d["name"] == testset_name and d["created"] == testset_created
411-
),
412-
None,
413-
)
414-
api_params = {"tid": state.testbed["testset_id"]}
415-
# Retrieve TestSet Data
416-
response = api_call.get(endpoint=endpoint, params=api_params)
395+
else:
396+
# Set required state from splitting selected DB TestSet
397+
testset_name, testset_created = state.selected_db_testset.split(" -- Created: ", 1)
398+
state.testbed["testset_name"] = testset_name
399+
state.testbed["testset_id"] = next(
400+
(
401+
d["tid"]
402+
for d in state.testbed_db_testsets
403+
if d["name"] == testset_name and d["created"] == testset_created
404+
),
405+
None,
406+
)
407+
api_params = {"tid": state.testbed["testset_id"]}
408+
# Retrieve TestSet Data
409+
response = api_call.get(endpoint=endpoint, params=api_params)
410+
except api_call.ApiError as ex:
411+
st.error(f"Error Generating TestSet: {ex}", icon="🚨")
412+
st.stop()
413+
except (ValueError, KeyError, TypeError) as ex:
414+
logger.error("Exception: %s", ex)
415+
st.error(f"Looks like you found a bug: {ex}", icon="🚨")
416+
st.stop()
417417

418418
try:
419419
state.testbed_qa = response["qa_data"]

src/server/api/utils/models.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,7 @@ def get_litellm_config(
277277
if giskard:
278278
litellm_config.pop("model", None)
279279
litellm_config.pop("temperature", None)
280+
litellm_config.pop("max_tokens", None)
280281

281282
logger.debug("LiteLLM Config: %s", litellm_config)
282283

0 commit comments

Comments
 (0)