cg-dot / vertexai-cf-workers

Vertex AI (GCP) Claude Proxy via Cloudflare workers
627 stars 99 forks source link

Add support for responses in OpenAI ChatCompletion format #15

Open MurphyLo opened 3 months ago

MurphyLo commented 3 months ago

When the request header contains x-api-key, return responses in the Anthropic /v1/messages format. Otherwise, when the request header contains an Authorization header, return responses in the OpenAI /v1/chat/completions endpoint format. Mentioned in #7.

MurphyLo commented 3 months ago

Note: Currently, only text or image_url message types from OpenAI /v1/chat/completions endpoint are supported.