parser.py support command parameter: protocol
This commit is contained in:
@@ -12,6 +12,7 @@ import os
|
||||
def inference_with_vllm(
|
||||
image,
|
||||
prompt,
|
||||
protocol="http",
|
||||
ip="localhost",
|
||||
port=8000,
|
||||
temperature=0.1,
|
||||
@@ -20,7 +21,7 @@ def inference_with_vllm(
|
||||
model_name='model',
|
||||
):
|
||||
|
||||
addr = f"http://{ip}:{port}/v1"
|
||||
addr = f"{protocol}://{ip}:{port}/v1"
|
||||
client = OpenAI(api_key="{}".format(os.environ.get("API_KEY", "0")), base_url=addr)
|
||||
messages = []
|
||||
messages.append(
|
||||
|
||||
Reference in New Issue
Block a user