Change the name to vLLM (#150)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
"""Example Python client for cacheflow.entrypoints.api_server"""
|
||||
"""Example Python client for vllm.entrypoints.api_server"""
|
||||
|
||||
import argparse
|
||||
import json
|
||||
|
||||
@@ -6,7 +6,7 @@ import requests
|
||||
|
||||
|
||||
def http_bot(prompt):
|
||||
headers = {"User-Agent": "Cacheflow Client"}
|
||||
headers = {"User-Agent": "vLLM Client"}
|
||||
pload = {
|
||||
"prompt": prompt,
|
||||
"stream": True,
|
||||
@@ -24,7 +24,7 @@ def http_bot(prompt):
|
||||
def build_demo():
|
||||
with gr.Blocks() as demo:
|
||||
gr.Markdown(
|
||||
"# Cacheflow text completion demo\n"
|
||||
"# vLLM text completion demo\n"
|
||||
)
|
||||
inputbox = gr.Textbox(label="Input", placeholder="Enter text and press ENTER")
|
||||
outputbox = gr.Textbox(label="Output", placeholder="Generated result from the model")
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import argparse
|
||||
|
||||
from cacheflow import EngineArgs, LLMEngine, SamplingParams
|
||||
from vllm import EngineArgs, LLMEngine, SamplingParams
|
||||
|
||||
|
||||
def main(args: argparse.Namespace):
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from cacheflow import LLM, SamplingParams
|
||||
from vllm import LLM, SamplingParams
|
||||
|
||||
|
||||
# Sample prompts.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import openai
|
||||
|
||||
# Modify OpenAI's API key and API base to use CacheFlow's API server.
|
||||
# Modify OpenAI's API key and API base to use vLLM's API server.
|
||||
openai.api_key = "EMPTY"
|
||||
openai.api_base = "http://localhost:8000/v1"
|
||||
model = "facebook/opt-125m"
|
||||
|
||||
Reference in New Issue
Block a user