llama_index icon indicating copy to clipboard operation
llama_index copied to clipboard

how charge openai api url

Open zbsean opened this issue 2 years ago • 2 comments

my app connect by proxy to openai, so the openai addres not api.openai.com. how charge it ?

zbsean avatar Mar 11 '23 10:03 zbsean

Just set the OPENAI_API_BASE environment variable like this

OPENAI_API_BASE = 'https://domain.com/api'

kenn avatar Mar 12 '23 00:03 kenn

Just set the OPENAI_API_BASE environment variable like this

OPENAI_API_BASE = 'https://domain.com/api'

I tried it and it doesn't seem to work

Axios1027 avatar Mar 14 '23 13:03 Axios1027

Duplicate of https://github.com/jerryjliu/llama_index/issues/640

Disiok avatar Mar 16 '23 17:03 Disiok

It works by setting env vars, but the env var has to be set before importing llama_index libs

chrischjh avatar Mar 17 '23 06:03 chrischjh