forked from phoenix-oss/llama-stack-mirror
Allow simpler initialization of RemoteProviderConfig
; fix issue in httpx client
This commit is contained in:
parent
064d2a5287
commit
489f74a70b
3 changed files with 28 additions and 9 deletions
|
@ -25,15 +25,19 @@ class ProviderFixture(BaseModel):
|
|||
|
||||
|
||||
def remote_stack_fixture() -> ProviderFixture:
|
||||
if url := os.getenv("REMOTE_STACK_URL", None):
|
||||
config = RemoteProviderConfig.from_url(url)
|
||||
else:
|
||||
config = RemoteProviderConfig(
|
||||
host=get_env_or_fail("REMOTE_STACK_HOST"),
|
||||
port=int(get_env_or_fail("REMOTE_STACK_PORT")),
|
||||
)
|
||||
return ProviderFixture(
|
||||
providers=[
|
||||
Provider(
|
||||
provider_id="remote",
|
||||
provider_type="remote",
|
||||
config=RemoteProviderConfig(
|
||||
host=get_env_or_fail("REMOTE_STACK_HOST"),
|
||||
port=int(get_env_or_fail("REMOTE_STACK_PORT")),
|
||||
).model_dump(),
|
||||
config=config.model_dump(),
|
||||
)
|
||||
],
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue