Files changed (5) hide show
  1. pyproject.toml +1 -0
  2. requirements-dev.txt +3 -0
  3. requirements.txt +3 -0
  4. tdagent/grchat.py +231 -74
  5. uv.lock +102 -0
pyproject.toml CHANGED
@@ -19,6 +19,7 @@ dependencies = [
19
  "langchain-huggingface>=0.2.0",
20
  "langchain-mcp-adapters>=0.1.1",
21
  "langgraph>=0.4.7",
 
22
  ]
23
 
24
  [project.scripts]
 
19
  "langchain-huggingface>=0.2.0",
20
  "langchain-mcp-adapters>=0.1.1",
21
  "langgraph>=0.4.7",
22
+ "openai>=1.84.0",
23
  ]
24
 
25
  [project.scripts]
requirements-dev.txt CHANGED
@@ -18,6 +18,7 @@ coverage==7.8.2
18
  cyclonedx-python-lib==9.1.0
19
  defusedxml==0.7.1
20
  distlib==0.3.9
 
21
  exceptiongroup==1.3.0 ; python_full_version < '3.11'
22
  fastapi==0.115.12
23
  ffmpy==0.6.0
@@ -36,6 +37,7 @@ identify==2.6.12
36
  idna==3.10
37
  iniconfig==2.1.0
38
  jinja2==3.1.6
 
39
  jmespath==1.0.1
40
  joblib==1.5.1
41
  jsonpatch==1.33
@@ -77,6 +79,7 @@ nvidia-cusparselt-cu12==0.6.3 ; platform_machine == 'x86_64' and sys_platform ==
77
  nvidia-nccl-cu12==2.26.2 ; platform_machine == 'x86_64' and sys_platform == 'linux'
78
  nvidia-nvjitlink-cu12==12.6.85 ; platform_machine == 'x86_64' and sys_platform == 'linux'
79
  nvidia-nvtx-cu12==12.6.77 ; platform_machine == 'x86_64' and sys_platform == 'linux'
 
80
  orjson==3.10.18
81
  ormsgpack==1.10.0
82
  packageurl-python==0.16.0
 
18
  cyclonedx-python-lib==9.1.0
19
  defusedxml==0.7.1
20
  distlib==0.3.9
21
+ distro==1.9.0
22
  exceptiongroup==1.3.0 ; python_full_version < '3.11'
23
  fastapi==0.115.12
24
  ffmpy==0.6.0
 
37
  idna==3.10
38
  iniconfig==2.1.0
39
  jinja2==3.1.6
40
+ jiter==0.10.0
41
  jmespath==1.0.1
42
  joblib==1.5.1
43
  jsonpatch==1.33
 
79
  nvidia-nccl-cu12==2.26.2 ; platform_machine == 'x86_64' and sys_platform == 'linux'
80
  nvidia-nvjitlink-cu12==12.6.85 ; platform_machine == 'x86_64' and sys_platform == 'linux'
81
  nvidia-nvtx-cu12==12.6.77 ; platform_machine == 'x86_64' and sys_platform == 'linux'
82
+ openai==1.84.0
83
  orjson==3.10.18
84
  ormsgpack==1.10.0
85
  packageurl-python==0.16.0
requirements.txt CHANGED
@@ -12,6 +12,7 @@ charset-normalizer==3.4.2
12
  click==8.2.1 ; sys_platform != 'emscripten'
13
  colorama==0.4.6 ; sys_platform == 'win32'
14
  coverage==7.8.2
 
15
  exceptiongroup==1.3.0 ; python_full_version < '3.11'
16
  fastapi==0.115.12
17
  ffmpy==0.6.0
@@ -29,6 +30,7 @@ huggingface-hub==0.32.3
29
  idna==3.10
30
  iniconfig==2.1.0
31
  jinja2==3.1.6
 
32
  jmespath==1.0.1
33
  joblib==1.5.1
34
  jsonpatch==1.33
@@ -65,6 +67,7 @@ nvidia-cusparselt-cu12==0.6.3 ; platform_machine == 'x86_64' and sys_platform ==
65
  nvidia-nccl-cu12==2.26.2 ; platform_machine == 'x86_64' and sys_platform == 'linux'
66
  nvidia-nvjitlink-cu12==12.6.85 ; platform_machine == 'x86_64' and sys_platform == 'linux'
67
  nvidia-nvtx-cu12==12.6.77 ; platform_machine == 'x86_64' and sys_platform == 'linux'
 
68
  orjson==3.10.18
69
  ormsgpack==1.10.0
70
  packaging==24.2
 
12
  click==8.2.1 ; sys_platform != 'emscripten'
13
  colorama==0.4.6 ; sys_platform == 'win32'
14
  coverage==7.8.2
15
+ distro==1.9.0
16
  exceptiongroup==1.3.0 ; python_full_version < '3.11'
17
  fastapi==0.115.12
18
  ffmpy==0.6.0
 
30
  idna==3.10
31
  iniconfig==2.1.0
32
  jinja2==3.1.6
33
+ jiter==0.10.0
34
  jmespath==1.0.1
35
  joblib==1.5.1
36
  jsonpatch==1.33
 
67
  nvidia-nccl-cu12==2.26.2 ; platform_machine == 'x86_64' and sys_platform == 'linux'
68
  nvidia-nvjitlink-cu12==12.6.85 ; platform_machine == 'x86_64' and sys_platform == 'linux'
69
  nvidia-nvtx-cu12==12.6.77 ; platform_machine == 'x86_64' and sys_platform == 'linux'
70
+ openai==1.84.0
71
  orjson==3.10.18
72
  ormsgpack==1.10.0
73
  packaging==24.2
tdagent/grchat.py CHANGED
@@ -2,7 +2,7 @@ from __future__ import annotations
2
 
3
  from collections.abc import Mapping, Sequence
4
  from types import MappingProxyType
5
- from typing import TYPE_CHECKING
6
 
7
  import boto3
8
  import botocore
@@ -13,6 +13,8 @@ from langchain_core.messages import AIMessage, HumanMessage, SystemMessage
13
  from langchain_huggingface import HuggingFaceEndpoint
14
  from langchain_mcp_adapters.client import MultiServerMCPClient
15
  from langgraph.prebuilt import create_react_agent
 
 
16
 
17
  from tdagent.grcomponents import MutableCheckBoxGroup, MutableCheckBoxGroupEntry
18
 
@@ -49,6 +51,15 @@ GRADIO_ROLE_TO_LG_MESSAGE_TYPE = MappingProxyType(
49
  },
50
  )
51
 
 
 
 
 
 
 
 
 
 
52
 
53
  #### Shared variables ####
54
 
@@ -64,6 +75,8 @@ def create_bedrock_llm(
64
  aws_secret_key: str,
65
  aws_session_token: str,
66
  aws_region: str,
 
 
67
  ) -> tuple[ChatBedrock | None, str]:
68
  """Create a LangGraph Bedrock agent."""
69
  boto3_config = {
@@ -72,7 +85,6 @@ def create_bedrock_llm(
72
  "aws_session_token": aws_session_token if aws_session_token else None,
73
  "region_name": aws_region,
74
  }
75
-
76
  # Verify credentials
77
  try:
78
  sts = boto3.client("sts", **boto3_config)
@@ -85,7 +97,7 @@ def create_bedrock_llm(
85
  llm = ChatBedrock(
86
  model_id=bedrock_model_id,
87
  client=bedrock_client,
88
- model_kwargs={"temperature": 0.8},
89
  )
90
  except Exception as e: # noqa: BLE001
91
  return None, str(e)
@@ -111,18 +123,41 @@ def create_hf_llm(
111
  return llm, ""
112
 
113
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
114
  #### UI functionality ####
115
- async def gr_connect_to_bedrock(
116
  model_id: str,
117
  access_key: str,
118
  secret_key: str,
119
  session_token: str,
120
  region: str,
121
  mcp_servers: Sequence[MutableCheckBoxGroupEntry] | None,
 
 
122
  ) -> str:
123
  """Initialize Bedrock agent."""
124
  global llm_agent # noqa: PLW0603
125
-
126
  if not access_key or not secret_key:
127
  return "❌ Please provide both Access Key ID and Secret Access Key"
128
 
@@ -132,6 +167,8 @@ async def gr_connect_to_bedrock(
132
  secret_key.strip(),
133
  session_token.strip(),
134
  region,
 
 
135
  )
136
 
137
  if llm is None:
@@ -146,7 +183,6 @@ async def gr_connect_to_bedrock(
146
  # }
147
  # )
148
  # tools = await client.get_tools()
149
- tools = []
150
  if mcp_servers:
151
  client = MultiServerMCPClient(
152
  {
@@ -158,7 +194,8 @@ async def gr_connect_to_bedrock(
158
  },
159
  )
160
  tools = await client.get_tools()
161
-
 
162
  llm_agent = create_react_agent(
163
  model=llm,
164
  tools=tools,
@@ -202,6 +239,39 @@ async def gr_connect_to_hf(
202
  return "✅ Successfully connected to Hugging Face!"
203
 
204
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
205
  async def gr_chat_function( # noqa: D103
206
  message: str,
207
  history: list[Mapping[str, str]],
@@ -228,49 +298,110 @@ async def gr_chat_function( # noqa: D103
228
 
229
  ## UI components ##
230
 
231
- with gr.Blocks() as gr_app:
232
- gr.Markdown("# 🔐 Secure Bedrock Chatbot")
233
-
234
- ### MCP Servers ###
235
- with gr.Accordion():
236
- mcp_list = MutableCheckBoxGroup(
237
- values=[
238
- MutableCheckBoxGroupEntry(
239
- name="TDAgent tools",
240
- value="https://agents-mcp-hackathon-tdagenttools.hf.space/gradio_api/mcp/sse",
241
- ),
242
- ],
243
- label="MCP Servers",
244
- )
245
 
246
- # Credentials section (collapsible)
247
- with gr.Accordion("🔑 Bedrock Configuration", open=True):
248
- gr.Markdown(
249
- "**Note**: Credentials are only stored in memory during your session.",
250
- )
251
- with gr.Row():
252
- bedrock_model_id_textbox = gr.Textbox(
253
- label="Bedrock Model Id",
254
- value="eu.anthropic.claude-3-5-sonnet-20240620-v1:0",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
255
  )
256
- with gr.Row():
257
  aws_access_key_textbox = gr.Textbox(
258
  label="AWS Access Key ID",
259
  type="password",
260
  placeholder="Enter your AWS Access Key ID",
 
261
  )
262
  aws_secret_key_textbox = gr.Textbox(
263
  label="AWS Secret Access Key",
264
  type="password",
265
  placeholder="Enter your AWS Secret Access Key",
 
266
  )
267
- with gr.Row():
268
- aws_session_token_textbox = gr.Textbox(
269
- label="AWS Session Token",
270
- type="password",
271
- placeholder="Enter your AWS session token",
272
- )
273
- with gr.Row():
274
  aws_region_dropdown = gr.Dropdown(
275
  label="AWS Region",
276
  choices=[
@@ -281,58 +412,84 @@ with gr.Blocks() as gr_app:
281
  "ap-southeast-1",
282
  ],
283
  value="eu-west-1",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
284
  )
285
- connect_btn = gr.Button("🔌 Connect to Bedrock", variant="primary")
286
 
 
287
  status_textbox = gr.Textbox(label="Connection Status", interactive=False)
288
 
289
  connect_btn.click(
290
- gr_connect_to_bedrock,
291
  inputs=[
292
- bedrock_model_id_textbox,
 
 
293
  aws_access_key_textbox,
294
  aws_secret_key_textbox,
295
  aws_session_token_textbox,
296
  aws_region_dropdown,
297
- mcp_list.state,
 
 
298
  ],
299
  outputs=[status_textbox],
300
  )
301
 
302
- with gr.Accordion("Hugging Face Configuration", open=True):
303
- with gr.Row():
304
- hf_model_id_textbox = gr.Textbox(
305
- label="HF Model Id",
306
- value="fdtn-ai/Foundation-Sec-8B",
307
- )
308
- with gr.Row():
309
- hf_access_token_textbox = gr.Textbox(
310
- label="Hugging Face Access Token",
311
- type="password",
312
- placeholder="Enter your Hugging Face Access Token",
313
- )
314
- hf_connect_btn = gr.Button("🔌 Connect to Hugging Face", variant="primary")
315
-
316
- status_textbox = gr.Textbox(label="Connection Status", interactive=False)
317
-
318
- hf_connect_btn.click(
319
- gr_connect_to_hf,
320
- inputs=[
321
- hf_model_id_textbox,
322
- hf_access_token_textbox,
323
- mcp_list.state,
324
- ],
325
- outputs=[status_textbox],
326
  )
327
 
328
- chat_interface = gr.ChatInterface(
329
- fn=gr_chat_function,
330
- type="messages",
331
- examples=[],
332
- title="Agent with MCP Tools",
333
- description="This is a simple agent that uses MCP tools.",
334
- )
335
-
336
 
337
  if __name__ == "__main__":
338
  gr_app.launch()
 
2
 
3
  from collections.abc import Mapping, Sequence
4
  from types import MappingProxyType
5
+ from typing import TYPE_CHECKING, Any
6
 
7
  import boto3
8
  import botocore
 
13
  from langchain_huggingface import HuggingFaceEndpoint
14
  from langchain_mcp_adapters.client import MultiServerMCPClient
15
  from langgraph.prebuilt import create_react_agent
16
+ from openai import OpenAI
17
+ from openai.types.chat import ChatCompletion
18
 
19
  from tdagent.grcomponents import MutableCheckBoxGroup, MutableCheckBoxGroupEntry
20
 
 
51
  },
52
  )
53
 
54
+ MODEL_OPTIONS = {
55
+ "AWS Bedrock": {
56
+ "Anthropic Claude 3.5 Sonnet": "eu.anthropic.claude-3-5-sonnet-20240620-v1:0",
57
+ # "Anthropic Claude 3.7 Sonnet": "anthropic.claude-3-7-sonnet-20250219-v1:0",
58
+ },
59
+ "HuggingFace": {
60
+ "Mistral 7B Instruct": "mistralai/Mistral-7B-Instruct",
61
+ },
62
+ }
63
 
64
  #### Shared variables ####
65
 
 
75
  aws_secret_key: str,
76
  aws_session_token: str,
77
  aws_region: str,
78
+ temperature: float = 0.8,
79
+ max_tokens: int = 512,
80
  ) -> tuple[ChatBedrock | None, str]:
81
  """Create a LangGraph Bedrock agent."""
82
  boto3_config = {
 
85
  "aws_session_token": aws_session_token if aws_session_token else None,
86
  "region_name": aws_region,
87
  }
 
88
  # Verify credentials
89
  try:
90
  sts = boto3.client("sts", **boto3_config)
 
97
  llm = ChatBedrock(
98
  model_id=bedrock_model_id,
99
  client=bedrock_client,
100
+ model_kwargs={"temperature": temperature, "max_tokens": max_tokens},
101
  )
102
  except Exception as e: # noqa: BLE001
103
  return None, str(e)
 
123
  return llm, ""
124
 
125
 
126
+ ## OpenAI LLM creation ##
127
+ def create_openai_llm(
128
+ model_id: str,
129
+ token_id: str,
130
+ ) -> tuple[ChatCompletion | None, str]:
131
+ """Create a LangGraph OpenAI agent."""
132
+ try:
133
+ client = OpenAI(
134
+ base_url="https://api.studio.nebius.com/v1/",
135
+ api_key=token_id,
136
+ )
137
+ llm = client.chat.completions.create(
138
+ messages=[], # needs to be fixed
139
+ model=model_id,
140
+ max_tokens=512,
141
+ temperature=0.8,
142
+ )
143
+ except Exception as e: # noqa: BLE001
144
+ return None, str(e)
145
+ return llm, ""
146
+
147
+
148
  #### UI functionality ####
149
+ async def gr_connect_to_bedrock( # noqa: PLR0913
150
  model_id: str,
151
  access_key: str,
152
  secret_key: str,
153
  session_token: str,
154
  region: str,
155
  mcp_servers: Sequence[MutableCheckBoxGroupEntry] | None,
156
+ temperature: float = 0.8,
157
+ max_tokens: int = 512,
158
  ) -> str:
159
  """Initialize Bedrock agent."""
160
  global llm_agent # noqa: PLW0603
 
161
  if not access_key or not secret_key:
162
  return "❌ Please provide both Access Key ID and Secret Access Key"
163
 
 
167
  secret_key.strip(),
168
  session_token.strip(),
169
  region,
170
+ temperature=temperature,
171
+ max_tokens=max_tokens,
172
  )
173
 
174
  if llm is None:
 
183
  # }
184
  # )
185
  # tools = await client.get_tools()
 
186
  if mcp_servers:
187
  client = MultiServerMCPClient(
188
  {
 
194
  },
195
  )
196
  tools = await client.get_tools()
197
+ else:
198
+ tools = []
199
  llm_agent = create_react_agent(
200
  model=llm,
201
  tools=tools,
 
239
  return "✅ Successfully connected to Hugging Face!"
240
 
241
 
242
+ async def gr_connect_to_nebius(
243
+ model_id: str,
244
+ nebius_access_token_textbox: str,
245
+ mcp_servers: Sequence[MutableCheckBoxGroupEntry] | None,
246
+ ) -> str:
247
+ """Initialize Hugging Face agent."""
248
+ global llm_agent # noqa: PLW0603
249
+
250
+ llm, error = create_openai_llm(model_id, nebius_access_token_textbox)
251
+
252
+ if llm is None:
253
+ return f"❌ Connection failed: {error}"
254
+ tools = []
255
+ if mcp_servers:
256
+ client = MultiServerMCPClient(
257
+ {
258
+ server.name.replace(" ", "-"): {
259
+ "url": server.value,
260
+ "transport": "sse",
261
+ }
262
+ for server in mcp_servers
263
+ },
264
+ )
265
+ tools = await client.get_tools()
266
+
267
+ llm_agent = create_react_agent(
268
+ model=str(llm),
269
+ tools=tools,
270
+ prompt=SYSTEM_MESSAGE,
271
+ )
272
+ return "✅ Successfully connected to nebius!"
273
+
274
+
275
  async def gr_chat_function( # noqa: D103
276
  message: str,
277
  history: list[Mapping[str, str]],
 
298
 
299
  ## UI components ##
300
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
301
 
302
+ # Function to toggle visibility and set model IDs
303
+ def toggle_model_fields(
304
+ provider: str,
305
+ ) -> tuple[
306
+ dict[str, Any],
307
+ dict[str, Any],
308
+ dict[str, Any],
309
+ dict[str, Any],
310
+ dict[str, Any],
311
+ dict[str, Any],
312
+ ]: # ignore: F821
313
+ """Toggle visibility of model fields based on the selected provider."""
314
+ # Update model choices based on the selected provider
315
+ if provider in MODEL_OPTIONS:
316
+ model_choices = list(MODEL_OPTIONS[provider].keys())
317
+ model_pretty = gr.update(choices=model_choices, visible=True, interactive=True)
318
+ else:
319
+ model_pretty = gr.update(choices=[], visible=False)
320
+
321
+ # Visibility settings for fields specific to each provider
322
+ is_aws = provider == "AWS Bedrock"
323
+ is_hf = provider == "HuggingFace"
324
+ return (
325
+ model_pretty,
326
+ gr.update(visible=is_aws, interactive=is_aws),
327
+ gr.update(visible=is_aws, interactive=is_aws),
328
+ gr.update(visible=is_aws, interactive=is_aws),
329
+ gr.update(visible=is_aws, interactive=is_aws),
330
+ gr.update(visible=is_hf, interactive=is_hf),
331
+ )
332
+
333
+
334
+ async def update_connection_status( # noqa: PLR0913
335
+ provider: str,
336
+ pretty_model: str,
337
+ mcp_list_state: Sequence[MutableCheckBoxGroupEntry] | None,
338
+ aws_access_key_textbox: str,
339
+ aws_secret_key_textbox: str,
340
+ aws_session_token_textbox: str,
341
+ aws_region_dropdown: str,
342
+ hf_token: str,
343
+ temperature: float,
344
+ max_tokens: int,
345
+ ) -> str:
346
+ """Update the connection status based on the selected provider and model."""
347
+ if not provider or not pretty_model:
348
+ return "❌ Please select a provider and model."
349
+ model_id = MODEL_OPTIONS.get(provider, {}).get(pretty_model)
350
+ if model_id:
351
+ if provider == "AWS Bedrock":
352
+ connection = await gr_connect_to_bedrock(
353
+ model_id,
354
+ aws_access_key_textbox,
355
+ aws_secret_key_textbox,
356
+ aws_session_token_textbox,
357
+ aws_region_dropdown,
358
+ mcp_list_state,
359
+ temperature,
360
+ max_tokens,
361
+ )
362
+ elif provider == "HuggingFace":
363
+ connection = await gr_connect_to_hf(model_id, hf_token, mcp_list_state)
364
+ elif provider == "Nebius":
365
+ connection = await gr_connect_to_nebius(model_id, hf_token, mcp_list_state)
366
+ else:
367
+ return "❌ Invalid provider"
368
+ return connection if connection else "❌ Invalid provider"
369
+
370
+
371
+ with gr.Blocks(
372
+ theme=gr.themes.Origin(primary_hue="teal", spacing_size="sm", font="sans-serif"),
373
+ title="TDAgent",
374
+ ) and gr.Row() as gr_app:
375
+ with gr.Column(scale=1):
376
+ with gr.Accordion("🔌 MCP Servers", open=False):
377
+ mcp_list = MutableCheckBoxGroup(
378
+ values=[
379
+ MutableCheckBoxGroupEntry(
380
+ name="TDAgent tools",
381
+ value="https://agents-mcp-hackathon-tdagenttools.hf.space/gradio_api/mcp/sse",
382
+ ),
383
+ ],
384
+ label="MCP Servers",
385
+ )
386
+
387
+ with gr.Accordion("⚙️ Provider Configuration", open=True):
388
+ model_provider = gr.Dropdown(
389
+ choices=list(MODEL_OPTIONS.keys()),
390
+ value=None,
391
+ label="Select Model Provider",
392
  )
 
393
  aws_access_key_textbox = gr.Textbox(
394
  label="AWS Access Key ID",
395
  type="password",
396
  placeholder="Enter your AWS Access Key ID",
397
+ visible=False,
398
  )
399
  aws_secret_key_textbox = gr.Textbox(
400
  label="AWS Secret Access Key",
401
  type="password",
402
  placeholder="Enter your AWS Secret Access Key",
403
+ visible=False,
404
  )
 
 
 
 
 
 
 
405
  aws_region_dropdown = gr.Dropdown(
406
  label="AWS Region",
407
  choices=[
 
412
  "ap-southeast-1",
413
  ],
414
  value="eu-west-1",
415
+ visible=False,
416
+ )
417
+ aws_session_token_textbox = gr.Textbox(
418
+ label="AWS Session Token",
419
+ type="password",
420
+ placeholder="Enter your AWS session token",
421
+ visible=False,
422
+ )
423
+ hf_token = gr.Textbox(
424
+ label="HuggingFace Token",
425
+ type="password",
426
+ placeholder="Enter your Hugging Face Access Token",
427
+ visible=False,
428
+ )
429
+
430
+ with gr.Accordion("🧠 Model Configuration", open=True):
431
+ model_display_id = gr.Dropdown(
432
+ label="Select Model ID",
433
+ choices=[],
434
+ visible=False,
435
+ )
436
+ model_provider.change(
437
+ toggle_model_fields,
438
+ inputs=[model_provider],
439
+ outputs=[
440
+ model_display_id,
441
+ aws_access_key_textbox,
442
+ aws_secret_key_textbox,
443
+ aws_session_token_textbox,
444
+ aws_region_dropdown,
445
+ hf_token,
446
+ ],
447
+ )
448
+ # Initialize the temperature and max tokens based on model specifications
449
+ temperature = gr.Slider(
450
+ label="Temperature",
451
+ minimum=0.0,
452
+ maximum=1.0,
453
+ value=0.8,
454
+ step=0.1,
455
+ )
456
+ max_tokens = gr.Slider(
457
+ label="Max Tokens",
458
+ minimum=64,
459
+ maximum=4096,
460
+ value=512,
461
+ step=64,
462
  )
 
463
 
464
+ connect_btn = gr.Button("🔌 Connect to Model", variant="primary")
465
  status_textbox = gr.Textbox(label="Connection Status", interactive=False)
466
 
467
  connect_btn.click(
468
+ update_connection_status,
469
  inputs=[
470
+ model_provider,
471
+ model_display_id,
472
+ mcp_list.state,
473
  aws_access_key_textbox,
474
  aws_secret_key_textbox,
475
  aws_session_token_textbox,
476
  aws_region_dropdown,
477
+ hf_token,
478
+ temperature,
479
+ max_tokens,
480
  ],
481
  outputs=[status_textbox],
482
  )
483
 
484
+ with gr.Column(scale=2):
485
+ chat_interface = gr.ChatInterface(
486
+ fn=gr_chat_function,
487
+ type="messages",
488
+ examples=[], # Add examples if needed
489
+ title="👩‍💻 TDAgent",
490
+ description="This is a simple agent that uses MCP tools.",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
491
  )
492
 
 
 
 
 
 
 
 
 
493
 
494
  if __name__ == "__main__":
495
  gr_app.launch()
uv.lock CHANGED
@@ -396,6 +396,15 @@ wheels = [
396
  { url = "https://files.pythonhosted.org/packages/91/a1/cf2472db20f7ce4a6be1253a81cfdf85ad9c7885ffbed7047fb72c24cf87/distlib-0.3.9-py2.py3-none-any.whl", hash = "sha256:47f8c22fd27c27e25a65601af709b38e4f0a45ea4fc2e710f65755fa8caaaf87", size = 468973, upload-time = "2024-10-09T18:35:44.272Z" },
397
  ]
398
 
 
 
 
 
 
 
 
 
 
399
  [[package]]
400
  name = "exceptiongroup"
401
  version = "1.3.0"
@@ -641,6 +650,78 @@ wheels = [
641
  { url = "https://files.pythonhosted.org/packages/62/a1/3d680cbfd5f4b8f15abc1d571870c5fc3e594bb582bc3b64ea099db13e56/jinja2-3.1.6-py3-none-any.whl", hash = "sha256:85ece4451f492d0c13c5dd7c13a64681a86afae63a5f347908daf103ce6d2f67", size = 134899, upload-time = "2025-03-05T20:05:00.369Z" },
642
  ]
643
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
644
  [[package]]
645
  name = "jmespath"
646
  version = "1.0.1"
@@ -1309,6 +1390,25 @@ wheels = [
1309
  { url = "https://files.pythonhosted.org/packages/9e/4e/0d0c945463719429b7bd21dece907ad0bde437a2ff12b9b12fee94722ab0/nvidia_nvtx_cu12-12.6.77-py3-none-manylinux2014_x86_64.whl", hash = "sha256:6574241a3ec5fdc9334353ab8c479fe75841dbe8f4532a8fc97ce63503330ba1", size = 89265, upload-time = "2024-10-01T17:00:38.172Z" },
1310
  ]
1311
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1312
  [[package]]
1313
  name = "orjson"
1314
  version = "3.10.18"
@@ -2342,6 +2442,7 @@ dependencies = [
2342
  { name = "langchain-huggingface" },
2343
  { name = "langchain-mcp-adapters" },
2344
  { name = "langgraph" },
 
2345
  ]
2346
 
2347
  [package.dev-dependencies]
@@ -2366,6 +2467,7 @@ requires-dist = [
2366
  { name = "langchain-huggingface", specifier = ">=0.2.0" },
2367
  { name = "langchain-mcp-adapters", specifier = ">=0.1.1" },
2368
  { name = "langgraph", specifier = ">=0.4.7" },
 
2369
  ]
2370
 
2371
  [package.metadata.requires-dev]
 
396
  { url = "https://files.pythonhosted.org/packages/91/a1/cf2472db20f7ce4a6be1253a81cfdf85ad9c7885ffbed7047fb72c24cf87/distlib-0.3.9-py2.py3-none-any.whl", hash = "sha256:47f8c22fd27c27e25a65601af709b38e4f0a45ea4fc2e710f65755fa8caaaf87", size = 468973, upload-time = "2024-10-09T18:35:44.272Z" },
397
  ]
398
 
399
+ [[package]]
400
+ name = "distro"
401
+ version = "1.9.0"
402
+ source = { registry = "https://pypi.org/simple" }
403
+ sdist = { url = "https://files.pythonhosted.org/packages/fc/f8/98eea607f65de6527f8a2e8885fc8015d3e6f5775df186e443e0964a11c3/distro-1.9.0.tar.gz", hash = "sha256:2fa77c6fd8940f116ee1d6b94a2f90b13b5ea8d019b98bc8bafdcabcdd9bdbed", size = 60722, upload-time = "2023-12-24T09:54:32.31Z" }
404
+ wheels = [
405
+ { url = "https://files.pythonhosted.org/packages/12/b3/231ffd4ab1fc9d679809f356cebee130ac7daa00d6d6f3206dd4fd137e9e/distro-1.9.0-py3-none-any.whl", hash = "sha256:7bffd925d65168f85027d8da9af6bddab658135b840670a223589bc0c8ef02b2", size = 20277, upload-time = "2023-12-24T09:54:30.421Z" },
406
+ ]
407
+
408
  [[package]]
409
  name = "exceptiongroup"
410
  version = "1.3.0"
 
650
  { url = "https://files.pythonhosted.org/packages/62/a1/3d680cbfd5f4b8f15abc1d571870c5fc3e594bb582bc3b64ea099db13e56/jinja2-3.1.6-py3-none-any.whl", hash = "sha256:85ece4451f492d0c13c5dd7c13a64681a86afae63a5f347908daf103ce6d2f67", size = 134899, upload-time = "2025-03-05T20:05:00.369Z" },
651
  ]
652
 
653
+ [[package]]
654
+ name = "jiter"
655
+ version = "0.10.0"
656
+ source = { registry = "https://pypi.org/simple" }
657
+ sdist = { url = "https://files.pythonhosted.org/packages/ee/9d/ae7ddb4b8ab3fb1b51faf4deb36cb48a4fbbd7cb36bad6a5fca4741306f7/jiter-0.10.0.tar.gz", hash = "sha256:07a7142c38aacc85194391108dc91b5b57093c978a9932bd86a36862759d9500", size = 162759, upload-time = "2025-05-18T19:04:59.73Z" }
658
+ wheels = [
659
+ { url = "https://files.pythonhosted.org/packages/be/7e/4011b5c77bec97cb2b572f566220364e3e21b51c48c5bd9c4a9c26b41b67/jiter-0.10.0-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:cd2fb72b02478f06a900a5782de2ef47e0396b3e1f7d5aba30daeb1fce66f303", size = 317215, upload-time = "2025-05-18T19:03:04.303Z" },
660
+ { url = "https://files.pythonhosted.org/packages/8a/4f/144c1b57c39692efc7ea7d8e247acf28e47d0912800b34d0ad815f6b2824/jiter-0.10.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:32bb468e3af278f095d3fa5b90314728a6916d89ba3d0ffb726dd9bf7367285e", size = 322814, upload-time = "2025-05-18T19:03:06.433Z" },
661
+ { url = "https://files.pythonhosted.org/packages/63/1f/db977336d332a9406c0b1f0b82be6f71f72526a806cbb2281baf201d38e3/jiter-0.10.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:aa8b3e0068c26ddedc7abc6fac37da2d0af16b921e288a5a613f4b86f050354f", size = 345237, upload-time = "2025-05-18T19:03:07.833Z" },
662
+ { url = "https://files.pythonhosted.org/packages/d7/1c/aa30a4a775e8a672ad7f21532bdbfb269f0706b39c6ff14e1f86bdd9e5ff/jiter-0.10.0-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:286299b74cc49e25cd42eea19b72aa82c515d2f2ee12d11392c56d8701f52224", size = 370999, upload-time = "2025-05-18T19:03:09.338Z" },
663
+ { url = "https://files.pythonhosted.org/packages/35/df/f8257abc4207830cb18880781b5f5b716bad5b2a22fb4330cfd357407c5b/jiter-0.10.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:6ed5649ceeaeffc28d87fb012d25a4cd356dcd53eff5acff1f0466b831dda2a7", size = 491109, upload-time = "2025-05-18T19:03:11.13Z" },
664
+ { url = "https://files.pythonhosted.org/packages/06/76/9e1516fd7b4278aa13a2cc7f159e56befbea9aa65c71586305e7afa8b0b3/jiter-0.10.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b2ab0051160cb758a70716448908ef14ad476c3774bd03ddce075f3c1f90a3d6", size = 388608, upload-time = "2025-05-18T19:03:12.911Z" },
665
+ { url = "https://files.pythonhosted.org/packages/6d/64/67750672b4354ca20ca18d3d1ccf2c62a072e8a2d452ac3cf8ced73571ef/jiter-0.10.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:03997d2f37f6b67d2f5c475da4412be584e1cec273c1cfc03d642c46db43f8cf", size = 352454, upload-time = "2025-05-18T19:03:14.741Z" },
666
+ { url = "https://files.pythonhosted.org/packages/96/4d/5c4e36d48f169a54b53a305114be3efa2bbffd33b648cd1478a688f639c1/jiter-0.10.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:c404a99352d839fed80d6afd6c1d66071f3bacaaa5c4268983fc10f769112e90", size = 391833, upload-time = "2025-05-18T19:03:16.426Z" },
667
+ { url = "https://files.pythonhosted.org/packages/0b/de/ce4a6166a78810bd83763d2fa13f85f73cbd3743a325469a4a9289af6dae/jiter-0.10.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:66e989410b6666d3ddb27a74c7e50d0829704ede652fd4c858e91f8d64b403d0", size = 523646, upload-time = "2025-05-18T19:03:17.704Z" },
668
+ { url = "https://files.pythonhosted.org/packages/a2/a6/3bc9acce53466972964cf4ad85efecb94f9244539ab6da1107f7aed82934/jiter-0.10.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:b532d3af9ef4f6374609a3bcb5e05a1951d3bf6190dc6b176fdb277c9bbf15ee", size = 514735, upload-time = "2025-05-18T19:03:19.44Z" },
669
+ { url = "https://files.pythonhosted.org/packages/b4/d8/243c2ab8426a2a4dea85ba2a2ba43df379ccece2145320dfd4799b9633c5/jiter-0.10.0-cp310-cp310-win32.whl", hash = "sha256:da9be20b333970e28b72edc4dff63d4fec3398e05770fb3205f7fb460eb48dd4", size = 210747, upload-time = "2025-05-18T19:03:21.184Z" },
670
+ { url = "https://files.pythonhosted.org/packages/37/7a/8021bd615ef7788b98fc76ff533eaac846322c170e93cbffa01979197a45/jiter-0.10.0-cp310-cp310-win_amd64.whl", hash = "sha256:f59e533afed0c5b0ac3eba20d2548c4a550336d8282ee69eb07b37ea526ee4e5", size = 207484, upload-time = "2025-05-18T19:03:23.046Z" },
671
+ { url = "https://files.pythonhosted.org/packages/1b/dd/6cefc6bd68b1c3c979cecfa7029ab582b57690a31cd2f346c4d0ce7951b6/jiter-0.10.0-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:3bebe0c558e19902c96e99217e0b8e8b17d570906e72ed8a87170bc290b1e978", size = 317473, upload-time = "2025-05-18T19:03:25.942Z" },
672
+ { url = "https://files.pythonhosted.org/packages/be/cf/fc33f5159ce132be1d8dd57251a1ec7a631c7df4bd11e1cd198308c6ae32/jiter-0.10.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:558cc7e44fd8e507a236bee6a02fa17199ba752874400a0ca6cd6e2196cdb7dc", size = 321971, upload-time = "2025-05-18T19:03:27.255Z" },
673
+ { url = "https://files.pythonhosted.org/packages/68/a4/da3f150cf1d51f6c472616fb7650429c7ce053e0c962b41b68557fdf6379/jiter-0.10.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4d613e4b379a07d7c8453c5712ce7014e86c6ac93d990a0b8e7377e18505e98d", size = 345574, upload-time = "2025-05-18T19:03:28.63Z" },
674
+ { url = "https://files.pythonhosted.org/packages/84/34/6e8d412e60ff06b186040e77da5f83bc158e9735759fcae65b37d681f28b/jiter-0.10.0-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:f62cf8ba0618eda841b9bf61797f21c5ebd15a7a1e19daab76e4e4b498d515b2", size = 371028, upload-time = "2025-05-18T19:03:30.292Z" },
675
+ { url = "https://files.pythonhosted.org/packages/fb/d9/9ee86173aae4576c35a2f50ae930d2ccb4c4c236f6cb9353267aa1d626b7/jiter-0.10.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:919d139cdfa8ae8945112398511cb7fca58a77382617d279556b344867a37e61", size = 491083, upload-time = "2025-05-18T19:03:31.654Z" },
676
+ { url = "https://files.pythonhosted.org/packages/d9/2c/f955de55e74771493ac9e188b0f731524c6a995dffdcb8c255b89c6fb74b/jiter-0.10.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:13ddbc6ae311175a3b03bd8994881bc4635c923754932918e18da841632349db", size = 388821, upload-time = "2025-05-18T19:03:33.184Z" },
677
+ { url = "https://files.pythonhosted.org/packages/81/5a/0e73541b6edd3f4aada586c24e50626c7815c561a7ba337d6a7eb0a915b4/jiter-0.10.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4c440ea003ad10927a30521a9062ce10b5479592e8a70da27f21eeb457b4a9c5", size = 352174, upload-time = "2025-05-18T19:03:34.965Z" },
678
+ { url = "https://files.pythonhosted.org/packages/1c/c0/61eeec33b8c75b31cae42be14d44f9e6fe3ac15a4e58010256ac3abf3638/jiter-0.10.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:dc347c87944983481e138dea467c0551080c86b9d21de6ea9306efb12ca8f606", size = 391869, upload-time = "2025-05-18T19:03:36.436Z" },
679
+ { url = "https://files.pythonhosted.org/packages/41/22/5beb5ee4ad4ef7d86f5ea5b4509f680a20706c4a7659e74344777efb7739/jiter-0.10.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:13252b58c1f4d8c5b63ab103c03d909e8e1e7842d302473f482915d95fefd605", size = 523741, upload-time = "2025-05-18T19:03:38.168Z" },
680
+ { url = "https://files.pythonhosted.org/packages/ea/10/768e8818538e5817c637b0df52e54366ec4cebc3346108a4457ea7a98f32/jiter-0.10.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:7d1bbf3c465de4a24ab12fb7766a0003f6f9bce48b8b6a886158c4d569452dc5", size = 514527, upload-time = "2025-05-18T19:03:39.577Z" },
681
+ { url = "https://files.pythonhosted.org/packages/73/6d/29b7c2dc76ce93cbedabfd842fc9096d01a0550c52692dfc33d3cc889815/jiter-0.10.0-cp311-cp311-win32.whl", hash = "sha256:db16e4848b7e826edca4ccdd5b145939758dadf0dc06e7007ad0e9cfb5928ae7", size = 210765, upload-time = "2025-05-18T19:03:41.271Z" },
682
+ { url = "https://files.pythonhosted.org/packages/c2/c9/d394706deb4c660137caf13e33d05a031d734eb99c051142e039d8ceb794/jiter-0.10.0-cp311-cp311-win_amd64.whl", hash = "sha256:9c9c1d5f10e18909e993f9641f12fe1c77b3e9b533ee94ffa970acc14ded3812", size = 209234, upload-time = "2025-05-18T19:03:42.918Z" },
683
+ { url = "https://files.pythonhosted.org/packages/6d/b5/348b3313c58f5fbfb2194eb4d07e46a35748ba6e5b3b3046143f3040bafa/jiter-0.10.0-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:1e274728e4a5345a6dde2d343c8da018b9d4bd4350f5a472fa91f66fda44911b", size = 312262, upload-time = "2025-05-18T19:03:44.637Z" },
684
+ { url = "https://files.pythonhosted.org/packages/9c/4a/6a2397096162b21645162825f058d1709a02965606e537e3304b02742e9b/jiter-0.10.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:7202ae396446c988cb2a5feb33a543ab2165b786ac97f53b59aafb803fef0744", size = 320124, upload-time = "2025-05-18T19:03:46.341Z" },
685
+ { url = "https://files.pythonhosted.org/packages/2a/85/1ce02cade7516b726dd88f59a4ee46914bf79d1676d1228ef2002ed2f1c9/jiter-0.10.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:23ba7722d6748b6920ed02a8f1726fb4b33e0fd2f3f621816a8b486c66410ab2", size = 345330, upload-time = "2025-05-18T19:03:47.596Z" },
686
+ { url = "https://files.pythonhosted.org/packages/75/d0/bb6b4f209a77190ce10ea8d7e50bf3725fc16d3372d0a9f11985a2b23eff/jiter-0.10.0-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:371eab43c0a288537d30e1f0b193bc4eca90439fc08a022dd83e5e07500ed026", size = 369670, upload-time = "2025-05-18T19:03:49.334Z" },
687
+ { url = "https://files.pythonhosted.org/packages/a0/f5/a61787da9b8847a601e6827fbc42ecb12be2c925ced3252c8ffcb56afcaf/jiter-0.10.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:6c675736059020365cebc845a820214765162728b51ab1e03a1b7b3abb70f74c", size = 489057, upload-time = "2025-05-18T19:03:50.66Z" },
688
+ { url = "https://files.pythonhosted.org/packages/12/e4/6f906272810a7b21406c760a53aadbe52e99ee070fc5c0cb191e316de30b/jiter-0.10.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0c5867d40ab716e4684858e4887489685968a47e3ba222e44cde6e4a2154f959", size = 389372, upload-time = "2025-05-18T19:03:51.98Z" },
689
+ { url = "https://files.pythonhosted.org/packages/e2/ba/77013b0b8ba904bf3762f11e0129b8928bff7f978a81838dfcc958ad5728/jiter-0.10.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:395bb9a26111b60141757d874d27fdea01b17e8fac958b91c20128ba8f4acc8a", size = 352038, upload-time = "2025-05-18T19:03:53.703Z" },
690
+ { url = "https://files.pythonhosted.org/packages/67/27/c62568e3ccb03368dbcc44a1ef3a423cb86778a4389e995125d3d1aaa0a4/jiter-0.10.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:6842184aed5cdb07e0c7e20e5bdcfafe33515ee1741a6835353bb45fe5d1bd95", size = 391538, upload-time = "2025-05-18T19:03:55.046Z" },
691
+ { url = "https://files.pythonhosted.org/packages/c0/72/0d6b7e31fc17a8fdce76164884edef0698ba556b8eb0af9546ae1a06b91d/jiter-0.10.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:62755d1bcea9876770d4df713d82606c8c1a3dca88ff39046b85a048566d56ea", size = 523557, upload-time = "2025-05-18T19:03:56.386Z" },
692
+ { url = "https://files.pythonhosted.org/packages/2f/09/bc1661fbbcbeb6244bd2904ff3a06f340aa77a2b94e5a7373fd165960ea3/jiter-0.10.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:533efbce2cacec78d5ba73a41756beff8431dfa1694b6346ce7af3a12c42202b", size = 514202, upload-time = "2025-05-18T19:03:57.675Z" },
693
+ { url = "https://files.pythonhosted.org/packages/1b/84/5a5d5400e9d4d54b8004c9673bbe4403928a00d28529ff35b19e9d176b19/jiter-0.10.0-cp312-cp312-win32.whl", hash = "sha256:8be921f0cadd245e981b964dfbcd6fd4bc4e254cdc069490416dd7a2632ecc01", size = 211781, upload-time = "2025-05-18T19:03:59.025Z" },
694
+ { url = "https://files.pythonhosted.org/packages/9b/52/7ec47455e26f2d6e5f2ea4951a0652c06e5b995c291f723973ae9e724a65/jiter-0.10.0-cp312-cp312-win_amd64.whl", hash = "sha256:a7c7d785ae9dda68c2678532a5a1581347e9c15362ae9f6e68f3fdbfb64f2e49", size = 206176, upload-time = "2025-05-18T19:04:00.305Z" },
695
+ { url = "https://files.pythonhosted.org/packages/2e/b0/279597e7a270e8d22623fea6c5d4eeac328e7d95c236ed51a2b884c54f70/jiter-0.10.0-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:e0588107ec8e11b6f5ef0e0d656fb2803ac6cf94a96b2b9fc675c0e3ab5e8644", size = 311617, upload-time = "2025-05-18T19:04:02.078Z" },
696
+ { url = "https://files.pythonhosted.org/packages/91/e3/0916334936f356d605f54cc164af4060e3e7094364add445a3bc79335d46/jiter-0.10.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:cafc4628b616dc32530c20ee53d71589816cf385dd9449633e910d596b1f5c8a", size = 318947, upload-time = "2025-05-18T19:04:03.347Z" },
697
+ { url = "https://files.pythonhosted.org/packages/6a/8e/fd94e8c02d0e94539b7d669a7ebbd2776e51f329bb2c84d4385e8063a2ad/jiter-0.10.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:520ef6d981172693786a49ff5b09eda72a42e539f14788124a07530f785c3ad6", size = 344618, upload-time = "2025-05-18T19:04:04.709Z" },
698
+ { url = "https://files.pythonhosted.org/packages/6f/b0/f9f0a2ec42c6e9c2e61c327824687f1e2415b767e1089c1d9135f43816bd/jiter-0.10.0-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:554dedfd05937f8fc45d17ebdf298fe7e0c77458232bcb73d9fbbf4c6455f5b3", size = 368829, upload-time = "2025-05-18T19:04:06.912Z" },
699
+ { url = "https://files.pythonhosted.org/packages/e8/57/5bbcd5331910595ad53b9fd0c610392ac68692176f05ae48d6ce5c852967/jiter-0.10.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5bc299da7789deacf95f64052d97f75c16d4fc8c4c214a22bf8d859a4288a1c2", size = 491034, upload-time = "2025-05-18T19:04:08.222Z" },
700
+ { url = "https://files.pythonhosted.org/packages/9b/be/c393df00e6e6e9e623a73551774449f2f23b6ec6a502a3297aeeece2c65a/jiter-0.10.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5161e201172de298a8a1baad95eb85db4fb90e902353b1f6a41d64ea64644e25", size = 388529, upload-time = "2025-05-18T19:04:09.566Z" },
701
+ { url = "https://files.pythonhosted.org/packages/42/3e/df2235c54d365434c7f150b986a6e35f41ebdc2f95acea3036d99613025d/jiter-0.10.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2e2227db6ba93cb3e2bf67c87e594adde0609f146344e8207e8730364db27041", size = 350671, upload-time = "2025-05-18T19:04:10.98Z" },
702
+ { url = "https://files.pythonhosted.org/packages/c6/77/71b0b24cbcc28f55ab4dbfe029f9a5b73aeadaba677843fc6dc9ed2b1d0a/jiter-0.10.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:15acb267ea5e2c64515574b06a8bf393fbfee6a50eb1673614aa45f4613c0cca", size = 390864, upload-time = "2025-05-18T19:04:12.722Z" },
703
+ { url = "https://files.pythonhosted.org/packages/6a/d3/ef774b6969b9b6178e1d1e7a89a3bd37d241f3d3ec5f8deb37bbd203714a/jiter-0.10.0-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:901b92f2e2947dc6dfcb52fd624453862e16665ea909a08398dde19c0731b7f4", size = 522989, upload-time = "2025-05-18T19:04:14.261Z" },
704
+ { url = "https://files.pythonhosted.org/packages/0c/41/9becdb1d8dd5d854142f45a9d71949ed7e87a8e312b0bede2de849388cb9/jiter-0.10.0-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:d0cb9a125d5a3ec971a094a845eadde2db0de85b33c9f13eb94a0c63d463879e", size = 513495, upload-time = "2025-05-18T19:04:15.603Z" },
705
+ { url = "https://files.pythonhosted.org/packages/9c/36/3468e5a18238bdedae7c4d19461265b5e9b8e288d3f86cd89d00cbb48686/jiter-0.10.0-cp313-cp313-win32.whl", hash = "sha256:48a403277ad1ee208fb930bdf91745e4d2d6e47253eedc96e2559d1e6527006d", size = 211289, upload-time = "2025-05-18T19:04:17.541Z" },
706
+ { url = "https://files.pythonhosted.org/packages/7e/07/1c96b623128bcb913706e294adb5f768fb7baf8db5e1338ce7b4ee8c78ef/jiter-0.10.0-cp313-cp313-win_amd64.whl", hash = "sha256:75f9eb72ecb640619c29bf714e78c9c46c9c4eaafd644bf78577ede459f330d4", size = 205074, upload-time = "2025-05-18T19:04:19.21Z" },
707
+ { url = "https://files.pythonhosted.org/packages/54/46/caa2c1342655f57d8f0f2519774c6d67132205909c65e9aa8255e1d7b4f4/jiter-0.10.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:28ed2a4c05a1f32ef0e1d24c2611330219fed727dae01789f4a335617634b1ca", size = 318225, upload-time = "2025-05-18T19:04:20.583Z" },
708
+ { url = "https://files.pythonhosted.org/packages/43/84/c7d44c75767e18946219ba2d703a5a32ab37b0bc21886a97bc6062e4da42/jiter-0.10.0-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:14a4c418b1ec86a195f1ca69da8b23e8926c752b685af665ce30777233dfe070", size = 350235, upload-time = "2025-05-18T19:04:22.363Z" },
709
+ { url = "https://files.pythonhosted.org/packages/01/16/f5a0135ccd968b480daad0e6ab34b0c7c5ba3bc447e5088152696140dcb3/jiter-0.10.0-cp313-cp313t-win_amd64.whl", hash = "sha256:d7bfed2fe1fe0e4dda6ef682cee888ba444b21e7a6553e03252e4feb6cf0adca", size = 207278, upload-time = "2025-05-18T19:04:23.627Z" },
710
+ { url = "https://files.pythonhosted.org/packages/1c/9b/1d646da42c3de6c2188fdaa15bce8ecb22b635904fc68be025e21249ba44/jiter-0.10.0-cp314-cp314-macosx_10_12_x86_64.whl", hash = "sha256:5e9251a5e83fab8d87799d3e1a46cb4b7f2919b895c6f4483629ed2446f66522", size = 310866, upload-time = "2025-05-18T19:04:24.891Z" },
711
+ { url = "https://files.pythonhosted.org/packages/ad/0e/26538b158e8a7c7987e94e7aeb2999e2e82b1f9d2e1f6e9874ddf71ebda0/jiter-0.10.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:023aa0204126fe5b87ccbcd75c8a0d0261b9abdbbf46d55e7ae9f8e22424eeb8", size = 318772, upload-time = "2025-05-18T19:04:26.161Z" },
712
+ { url = "https://files.pythonhosted.org/packages/7b/fb/d302893151caa1c2636d6574d213e4b34e31fd077af6050a9c5cbb42f6fb/jiter-0.10.0-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3c189c4f1779c05f75fc17c0c1267594ed918996a231593a21a5ca5438445216", size = 344534, upload-time = "2025-05-18T19:04:27.495Z" },
713
+ { url = "https://files.pythonhosted.org/packages/01/d8/5780b64a149d74e347c5128d82176eb1e3241b1391ac07935693466d6219/jiter-0.10.0-cp314-cp314-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:15720084d90d1098ca0229352607cd68256c76991f6b374af96f36920eae13c4", size = 369087, upload-time = "2025-05-18T19:04:28.896Z" },
714
+ { url = "https://files.pythonhosted.org/packages/e8/5b/f235a1437445160e777544f3ade57544daf96ba7e96c1a5b24a6f7ac7004/jiter-0.10.0-cp314-cp314-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e4f2fb68e5f1cfee30e2b2a09549a00683e0fde4c6a2ab88c94072fc33cb7426", size = 490694, upload-time = "2025-05-18T19:04:30.183Z" },
715
+ { url = "https://files.pythonhosted.org/packages/85/a9/9c3d4617caa2ff89cf61b41e83820c27ebb3f7b5fae8a72901e8cd6ff9be/jiter-0.10.0-cp314-cp314-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ce541693355fc6da424c08b7edf39a2895f58d6ea17d92cc2b168d20907dee12", size = 388992, upload-time = "2025-05-18T19:04:32.028Z" },
716
+ { url = "https://files.pythonhosted.org/packages/68/b1/344fd14049ba5c94526540af7eb661871f9c54d5f5601ff41a959b9a0bbd/jiter-0.10.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:31c50c40272e189d50006ad5c73883caabb73d4e9748a688b216e85a9a9ca3b9", size = 351723, upload-time = "2025-05-18T19:04:33.467Z" },
717
+ { url = "https://files.pythonhosted.org/packages/41/89/4c0e345041186f82a31aee7b9d4219a910df672b9fef26f129f0cda07a29/jiter-0.10.0-cp314-cp314-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:fa3402a2ff9815960e0372a47b75c76979d74402448509ccd49a275fa983ef8a", size = 392215, upload-time = "2025-05-18T19:04:34.827Z" },
718
+ { url = "https://files.pythonhosted.org/packages/55/58/ee607863e18d3f895feb802154a2177d7e823a7103f000df182e0f718b38/jiter-0.10.0-cp314-cp314-musllinux_1_1_aarch64.whl", hash = "sha256:1956f934dca32d7bb647ea21d06d93ca40868b505c228556d3373cbd255ce853", size = 522762, upload-time = "2025-05-18T19:04:36.19Z" },
719
+ { url = "https://files.pythonhosted.org/packages/15/d0/9123fb41825490d16929e73c212de9a42913d68324a8ce3c8476cae7ac9d/jiter-0.10.0-cp314-cp314-musllinux_1_1_x86_64.whl", hash = "sha256:fcedb049bdfc555e261d6f65a6abe1d5ad68825b7202ccb9692636c70fcced86", size = 513427, upload-time = "2025-05-18T19:04:37.544Z" },
720
+ { url = "https://files.pythonhosted.org/packages/d8/b3/2bd02071c5a2430d0b70403a34411fc519c2f227da7b03da9ba6a956f931/jiter-0.10.0-cp314-cp314-win32.whl", hash = "sha256:ac509f7eccca54b2a29daeb516fb95b6f0bd0d0d8084efaf8ed5dfc7b9f0b357", size = 210127, upload-time = "2025-05-18T19:04:38.837Z" },
721
+ { url = "https://files.pythonhosted.org/packages/03/0c/5fe86614ea050c3ecd728ab4035534387cd41e7c1855ef6c031f1ca93e3f/jiter-0.10.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:5ed975b83a2b8639356151cef5c0d597c68376fc4922b45d0eb384ac058cfa00", size = 318527, upload-time = "2025-05-18T19:04:40.612Z" },
722
+ { url = "https://files.pythonhosted.org/packages/b3/4a/4175a563579e884192ba6e81725fc0448b042024419be8d83aa8a80a3f44/jiter-0.10.0-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3aa96f2abba33dc77f79b4cf791840230375f9534e5fac927ccceb58c5e604a5", size = 354213, upload-time = "2025-05-18T19:04:41.894Z" },
723
+ ]
724
+
725
  [[package]]
726
  name = "jmespath"
727
  version = "1.0.1"
 
1390
  { url = "https://files.pythonhosted.org/packages/9e/4e/0d0c945463719429b7bd21dece907ad0bde437a2ff12b9b12fee94722ab0/nvidia_nvtx_cu12-12.6.77-py3-none-manylinux2014_x86_64.whl", hash = "sha256:6574241a3ec5fdc9334353ab8c479fe75841dbe8f4532a8fc97ce63503330ba1", size = 89265, upload-time = "2024-10-01T17:00:38.172Z" },
1391
  ]
1392
 
1393
+ [[package]]
1394
+ name = "openai"
1395
+ version = "1.84.0"
1396
+ source = { registry = "https://pypi.org/simple" }
1397
+ dependencies = [
1398
+ { name = "anyio" },
1399
+ { name = "distro" },
1400
+ { name = "httpx" },
1401
+ { name = "jiter" },
1402
+ { name = "pydantic" },
1403
+ { name = "sniffio" },
1404
+ { name = "tqdm" },
1405
+ { name = "typing-extensions" },
1406
+ ]
1407
+ sdist = { url = "https://files.pythonhosted.org/packages/91/a3/128caf24e116f48fad3e4d5122cdf84db06c5127911849d51663c66158c8/openai-1.84.0.tar.gz", hash = "sha256:4caa43bdab262cc75680ce1a2322cfc01626204074f7e8d9939ab372acf61698", size = 467066, upload-time = "2025-06-03T17:10:53.651Z" }
1408
+ wheels = [
1409
+ { url = "https://files.pythonhosted.org/packages/2a/10/f245db006a860dbc1f2e2c8382e0a1762c7753e7971ba43a1dc3f3ec1404/openai-1.84.0-py3-none-any.whl", hash = "sha256:7ec4436c3c933d68dc0f5a0cef0cb3dbc0864a54d62bddaf2ed5f3d521844711", size = 725512, upload-time = "2025-06-03T17:10:51.195Z" },
1410
+ ]
1411
+
1412
  [[package]]
1413
  name = "orjson"
1414
  version = "3.10.18"
 
2442
  { name = "langchain-huggingface" },
2443
  { name = "langchain-mcp-adapters" },
2444
  { name = "langgraph" },
2445
+ { name = "openai" },
2446
  ]
2447
 
2448
  [package.dev-dependencies]
 
2467
  { name = "langchain-huggingface", specifier = ">=0.2.0" },
2468
  { name = "langchain-mcp-adapters", specifier = ">=0.1.1" },
2469
  { name = "langgraph", specifier = ">=0.4.7" },
2470
+ { name = "openai", specifier = ">=1.84.0" },
2471
  ]
2472
 
2473
  [package.metadata.requires-dev]