mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-06-28 19:04:19 +00:00
use API version in "remote" stack client
This commit is contained in:
parent
7bfcfe80b5
commit
e605d57fb7
1 changed files with 3 additions and 1 deletions
|
@ -15,6 +15,8 @@ import httpx
|
||||||
from pydantic import BaseModel, parse_obj_as
|
from pydantic import BaseModel, parse_obj_as
|
||||||
from termcolor import cprint
|
from termcolor import cprint
|
||||||
|
|
||||||
|
from llama_stack.apis.version import LLAMA_STACK_API_VERSION
|
||||||
|
|
||||||
from llama_stack.providers.datatypes import RemoteProviderConfig
|
from llama_stack.providers.datatypes import RemoteProviderConfig
|
||||||
|
|
||||||
_CLIENT_CLASSES = {}
|
_CLIENT_CLASSES = {}
|
||||||
|
@ -117,7 +119,7 @@ def create_api_client_class(protocol) -> Type:
|
||||||
break
|
break
|
||||||
kwargs[param.name] = args[i]
|
kwargs[param.name] = args[i]
|
||||||
|
|
||||||
url = f"{self.base_url}{webmethod.route}"
|
url = f"{self.base_url}/{LLAMA_STACK_API_VERSION}/{webmethod.route.lstrip('/')}"
|
||||||
|
|
||||||
def convert(value):
|
def convert(value):
|
||||||
if isinstance(value, list):
|
if isinstance(value, list):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue