VLMEvalKit icon indicating copy to clipboard operation
VLMEvalKit copied to clipboard

azure or vertex

Open AdvancedBot opened this issue 7 months ago • 3 comments

如果我使用azure的gpt4o api,或者vertex的gemini 2.5 pro 我应该在.env文件里怎么写

If I use Azure's GPT - 4O API or Vertex's Gemini 2.5 Pro, what should I write in the .env file?

我这样写但是报错了

my .env文件 OPENAI_API_KEY="my key" OPENAI_API_BASE="my link"

got error /mnt/largeml-train-gui-agent/hankaiyang/packages/VLMEvalKit/vlmeval/dataset/image_mcq.py:254: UserWarning: OPENAI_API_KEY is not set properly, will use exact matching for evaluation warnings.warn('OPENAI_API_KEY is not set properly, will use exact matching for evaluation')

AdvancedBot avatar May 30 '25 09:05 AdvancedBot

ENVs for AZURE GPT-4o (the feature is supported by the community):

  1. AZURE_OPENAI_ENDPOINT
  2. AZURE_OPENAI_DEPLOYMENT_NAME
  3. OPENAI_API_VERSION
  4. Moreover, you need to set use_azure=True in class GPT4V instantiation

ENVs for Gemini Vertex:

  1. GOOGLE_API_BACKEND=vertex

To use gemini with vertex backend, you need to first follow the official guide of vertex backend and complete the setup. Once all set, you don't need to provide an API key.

kennymckormick avatar Jun 03 '25 09:06 kennymckormick

ENVs for AZURE GPT-4o (the feature is supported by the community):

  1. AZURE_OPENAI_ENDPOINT
  2. AZURE_OPENAI_DEPLOYMENT_NAME
  3. OPENAI_API_VERSION
  4. Moreover, you need to set use_azure=True in class GPT4V instantiation

ENVs for Gemini Vertex:

  1. GOOGLE_API_BACKEND=vertex

To use gemini with vertex backend, you need to first follow the official guide of vertex backend and complete the setup. Once all set, you don't need to provide an API key.

sad, not work for me.😭

AdvancedBot avatar Jun 06 '25 09:06 AdvancedBot

Hi, any update on this, how to use Azure api? Thanks very much

ruiiu avatar Jul 03 '25 06:07 ruiiu