Skip to content

Commit 809ea0f

Browse files
committed
chore: Improved the Gradio web app.
1 parent a5f79bd commit 809ea0f

File tree

4 files changed

+126
-137
lines changed

4 files changed

+126
-137
lines changed

src/dqa/actor/mhqa.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
from dapr.clients import DaprClient
2727
from pydantic import TypeAdapter
2828

29-
from dqa import env, ic
29+
from dqa import env
3030
from dqa.actor import MHQAActorMethods
3131
from dqa.model.mhqa import MCPToolInvocation, MHQAResponse
3232

@@ -279,7 +279,7 @@ async def get_chat_history(self) -> list:
279279
if not self._cancelled:
280280
chat_messages = await self.workflow_memory.aget_all()
281281
for msg in chat_messages:
282-
ic(msg.role, msg.content, type(msg.content), msg.additional_kwargs)
282+
# ic(msg.role, msg.content, type(msg.content), msg.additional_kwargs)
283283
# Is this list traversal in a consistent order?
284284
if msg.role == MessageRole.USER:
285285
user_input: str = msg.content

src/dqa/cli/a2a.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ async def _echo_a2a_echo(
100100
thread_id: str,
101101
) -> EchoResponseWithHistory:
102102
async with httpx.AsyncClient() as httpx_client:
103-
client = await self.obtain_a2a_client(
103+
client, _ = await self.obtain_a2a_client(
104104
httpx_client=httpx_client,
105105
base_url=self.echo_base_url,
106106
)
@@ -155,7 +155,7 @@ async def _echo_a2a_history(
155155
thread_id: str,
156156
) -> List[EchoResponse]:
157157
async with httpx.AsyncClient() as httpx_client:
158-
client = await self.obtain_a2a_client(
158+
client, _ = await self.obtain_a2a_client(
159159
httpx_client=httpx_client,
160160
base_url=self.echo_base_url,
161161
)
@@ -207,7 +207,7 @@ async def _echo_a2a_delete_history(
207207
thread_id: str,
208208
) -> str:
209209
async with httpx.AsyncClient() as httpx_client:
210-
client = await self.obtain_a2a_client(
210+
client, _ = await self.obtain_a2a_client(
211211
httpx_client=httpx_client,
212212
base_url=self.echo_base_url,
213213
)
@@ -254,7 +254,7 @@ async def _mhqa_chat(
254254
thread_id: str,
255255
) -> MHQAResponse:
256256
async with httpx.AsyncClient() as httpx_client:
257-
client = await self.obtain_a2a_client(
257+
client, _ = await self.obtain_a2a_client(
258258
httpx_client=httpx_client,
259259
base_url=self.mhqa_base_url,
260260
)
@@ -304,7 +304,7 @@ async def _mhqa_get_history(
304304
thread_id: str,
305305
) -> List[MHQAResponse]:
306306
async with httpx.AsyncClient() as httpx_client:
307-
client = await self.obtain_a2a_client(
307+
client, _ = await self.obtain_a2a_client(
308308
httpx_client=httpx_client,
309309
base_url=self.mhqa_base_url,
310310
)
@@ -354,7 +354,7 @@ async def _mhqa_delete_history(
354354
thread_id: str,
355355
) -> str:
356356
async with httpx.AsyncClient() as httpx_client:
357-
client = await self.obtain_a2a_client(
357+
client, _ = await self.obtain_a2a_client(
358358
httpx_client=httpx_client,
359359
base_url=self.mhqa_base_url,
360360
)

src/dqa/client/a2a_mixin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,4 @@ async def obtain_a2a_client(
3939
)
4040
).create(card=final_agent_card_to_use)
4141
logger.info("A2A client initialised.")
42-
return client
42+
return client, final_agent_card_to_use

0 commit comments

Comments
 (0)