View source: R/provider-vllm.R
| chat_vllm | R Documentation |
vLLM is an open source library that
provides an efficient and convenient LLMs model server. You can use
chat_vllm() to connect to endpoints powered by vLLM.
Uses OpenAI compatible API via chat_openai_compatible().
chat_vllm(
base_url,
system_prompt = NULL,
model,
params = NULL,
api_args = list(),
api_key = NULL,
credentials = NULL,
echo = NULL,
api_headers = character()
)
models_vllm(base_url, api_key = NULL, credentials = NULL)
base_url |
The base URL to the API endpoint. |
system_prompt |
A system prompt to set the behavior of the assistant. |
model |
The model to use for the chat.
Use |
params |
Common model parameters, usually created by |
api_args |
Named list of arbitrary extra arguments appended to the body
of every chat API call. Combined with the body object generated by ellmer
with |
api_key |
|
credentials |
Override the default credentials. You generally should not need this argument; instead set the If you do need additional control, this argument takes a zero-argument function that returns either a string (the API key), or a named list (added as additional headers to every request). |
echo |
One of the following options:
Note this only affects the |
api_headers |
Named character vector of arbitrary extra headers appended to every chat API call. |
A Chat object.
## Not run:
chat <- chat_vllm("http://my-vllm.com")
chat$chat("Tell me three jokes about statisticians")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.