FastChat icon indicating copy to clipboard operation
FastChat copied to clipboard

How can i access the API via IP address

Open micelvrice opened this issue 1 year ago • 1 comments

i can curl http://localhost:8000/v1/chat/completions -H "Content-Type: application/json" -d '{"model": "vicuna-13b-v1.1", "messages": [{"role": "user", "content": "Hello!"}]}'

now i want to curl http://10.109.X.X:8000/v1/chat/completions -H "Content-Type: application/json" -d '{"model": "vicuna-13b-v1.1", "messages": [{"role": "user", "content": "Hello!"}]}'. where should i change?

micelvrice avatar May 03 '23 15:05 micelvrice

When running API server , try python3 -m fastchat.serve.api --host 0.0.0.0 --port 8000 instead of localhost

ItsCRC avatar May 04 '23 09:05 ItsCRC

I think @ItsCRC is correct.

merrymercy avatar May 05 '23 15:05 merrymercy