Skip to content

FEAT: RESTful API #40

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 36 commits into from
Jul 6, 2023
Merged

FEAT: RESTful API #40

merged 36 commits into from
Jul 6, 2023

Conversation

jiayini1119
Copy link
Contributor

@jiayini1119 jiayini1119 commented Jun 28, 2023

Resolves #18

python -m plexar.deploy.cmdline supervisor -a localhost:9999 --log-level debug
python -m plexar.deploy.cmdline worker --supervisor-address localhost:9999 -a localhost:10000 --log-level debug
In [1]: from plexar.client import RESTfulClient
In [2]: client = RESTfulClient("http://0.0.0.0:8000")
In [3]: client.launch_model(model_name="baichuan", quantization="q4_0")
Out[3]: '0e1c880e-1b07-11ee-b9de-a1e57d13cecc'
In [4]: client.generate(model_uid='0e1c880e-1b07-11ee-b9de-a1e57d13cecc', prompt="Once upon a time, there was a very old computer.")
In [5]: client.launch_model(model_name="wizardlm-v1.0", quantization="q4_0")
Out[5]: '21d09084-1b07-11ee-b9de-a1e57d13cecc'
In [6]: client.chat(model_uid="21d09084-1b07-11ee-b9de-a1e57d13cecc", prompt="What can I eat in the capital of France?", system_prompt="you are a helpful AI assistant", chat_history=[{"role": "user", "conte
   ...: nt": "Hello!"}, {"role": "assistant", "content": "Hi what can I help you?"}, {"role": "user", "content": "What is the capital of France?"},{"role": "assistant", "content": "The capital of France is 
   ...: Paris."}])

@jiayini1119 jiayini1119 marked this pull request as ready for review June 29, 2023 03:06
@jiayini1119 jiayini1119 marked this pull request as draft June 29, 2023 03:29
@jiayini1119 jiayini1119 marked this pull request as ready for review July 5, 2023 07:43
@UranusSeven UranusSeven merged commit 8997c1e into xorbitsai:main Jul 6, 2023
qinxuye pushed a commit to qinxuye/inference that referenced this pull request Jul 24, 2024
qinxuye added a commit to qinxuye/inference that referenced this pull request Sep 29, 2024
qinxuye added a commit to qinxuye/inference that referenced this pull request Oct 1, 2024
qinxuye added a commit to qinxuye/inference that referenced this pull request Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FEAT: RESTful API
2 participants