mirror of
https://github.com/bentoml/OpenLLM.git
synced 2026-03-08 00:59:50 -05:00
refactor(config): simplify configuration and update start CLI output (#611)
* chore(config): simplify configuration and update start CLI output handling Signed-off-by: Aaron <29749331+aarnphm@users.noreply.github.com> * chore: remove state and message sent after server lifecycle Signed-off-by: Aaron <29749331+aarnphm@users.noreply.github.com> * chore: update color stream and refactor reusable logic Signed-off-by: Aaron <29749331+aarnphm@users.noreply.github.com> * chore: update documentations and mypy Signed-off-by: Aaron <29749331+aarnphm@users.noreply.github.com> --------- Signed-off-by: Aaron <29749331+aarnphm@users.noreply.github.com>
This commit is contained in:
@@ -1,27 +1,9 @@
|
||||
"""OpenLLM Python client.
|
||||
|
||||
```python
|
||||
client = openllm.client.HTTPClient("http://localhost:8080")
|
||||
client.query("What is the difference between gather and scatter?")
|
||||
```
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
import typing as t
|
||||
|
||||
import openllm_client
|
||||
import openllm_client as _client
|
||||
|
||||
|
||||
if t.TYPE_CHECKING:
|
||||
from openllm_client import AsyncHTTPClient as AsyncHTTPClient
|
||||
from openllm_client import HTTPClient as HTTPClient
|
||||
# from openllm_client import AsyncGrpcClient as AsyncGrpcClient
|
||||
# from openllm_client import GrpcClient as GrpcClient
|
||||
def __dir__():
|
||||
return sorted(dir(_client))
|
||||
|
||||
|
||||
def __dir__() -> t.Sequence[str]:
|
||||
return sorted(dir(openllm_client))
|
||||
|
||||
|
||||
def __getattr__(it: str) -> t.Any:
|
||||
return getattr(openllm_client, it)
|
||||
def __getattr__(it):
|
||||
return getattr(_client, it)
|
||||
|
||||
Reference in New Issue
Block a user