File tree Expand file tree Collapse file tree
sdk/python/src/syfthub_sdk Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -221,7 +221,7 @@ def get_sdk_client_for_user(user_email: str) -> Optional["SyftHubSDKClient"]:
221221 # Use internal URLs for container-to-container communication
222222 client = SyftHubSDKClient (
223223 base_url = SYFTHUB_URL , # Internal backend URL (http://backend:8000)
224- aggregator_url = AGGREGATOR_URL , # Internal aggregator URL (http://aggregator:8001)
224+ aggregator_url = f" { AGGREGATOR_URL . rstrip ( '/' ) } /api/v1" , # SDK expects URL with /api/v1 suffix
225225 timeout = 60.0
226226 )
227227 client .set_tokens (AuthTokens (
Original file line number Diff line number Diff line change @@ -501,7 +501,7 @@ def complete(
501501
502502 try :
503503 response = self ._agg_client .post (
504- f"{ self ._aggregator_url } /api/v1/ chat" ,
504+ f"{ self ._aggregator_url } /chat" ,
505505 json = request_body ,
506506 headers = {"Content-Type" : "application/json" },
507507 )
@@ -627,7 +627,7 @@ def stream(
627627 try :
628628 with self ._agg_client .stream (
629629 "POST" ,
630- f"{ self ._aggregator_url } /api/v1/ chat/stream" ,
630+ f"{ self ._aggregator_url } /chat/stream" ,
631631 json = request_body ,
632632 headers = {
633633 "Content-Type" : "application/json" ,
You can’t perform that action at this time.
0 commit comments