rename ModelInference to Inference

This commit is contained in:
rsm 2024-07-21 12:19:52 -07:00
parent 245461620d
commit 67f0510edd
18 changed files with 468 additions and 1636 deletions

View file

@ -10,12 +10,12 @@ from .api import (
ChatCompletionResponseStreamChunk,
CompletionRequest,
InstructModel,
ModelInference,
Inference,
UserMessage,
)
class ModelInferenceClient(ModelInference):
class InferenceClient(Inference):
def __init__(self, base_url: str):
self.base_url = base_url
@ -48,7 +48,7 @@ class ModelInferenceClient(ModelInference):
async def run_main(host: str, port: int):
client = ModelInferenceClient(f"http://{host}:{port}")
client = InferenceClient(f"http://{host}:{port}")
message = UserMessage(content="hello world, help me out here")
req = ChatCompletionRequest(