mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-22 18:46:16 +00:00
cleanup: remove unusable code
Signed-off-by: Calum Murray <cmurray@redhat.com>
This commit is contained in:
parent
ac0e3e133c
commit
211800146e
1 changed files with 2 additions and 9 deletions
|
|
@ -48,16 +48,9 @@ async def client_wrapper(endpoint: str, headers: dict[str, str]) -> AsyncGenerat
|
|||
|
||||
for i, strategy in enumerate(connection_strategies):
|
||||
try:
|
||||
if strategy == MCPProtol.STREAMABLE_HTTP:
|
||||
client = streamablehttp_client
|
||||
elif strategy == MCPProtol.SSE:
|
||||
client = streamablehttp_client
|
||||
if strategy == MCPProtol.SSE:
|
||||
client = sse_client
|
||||
else:
|
||||
# this should not happen
|
||||
logger.warning(
|
||||
"tried to establish MCP connection with UNKNOWN protocol, defaulting to try with STREAMABLE_HTTP"
|
||||
)
|
||||
client = streamablehttp_client
|
||||
async with client(endpoint, headers=headers) as client_streams:
|
||||
async with ClientSession(read_stream=client_streams[0], write_stream=client_streams[1]) as session:
|
||||
await session.initialize()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue