Google Vertex AI
BetaGoogle Vertex AI ↗ は、開発者が企業向けの生成AI体験を簡単に構築および展開できるようにします。
https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/google-vertex-ai
Google Vertexにリクエストを送信する際に必要なものは次のとおりです:
- AI Gatewayアカウントタグ
- AI Gatewayゲートウェイ名
- Google Vertex APIキー
- Google Vertexプロジェクト名
- Google Vertexリージョン(例:us-east4)
- Google Vertexモデル
新しいベースURLは、上記のデータを使用してこの構造になります:https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/google-vertex-ai/v1/projects/{project_name}/locations/{region}。
次に、アクセスしたいエンドポイントを追加できます。例えば:/publishers/google/models/{model}:{generative_ai_rest_resource}
したがって、最終的なURLは次のようになります:https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/google-vertex-ai/v1/projects/{project_name}/locations/{region}/publishers/google/models/gemini-1.0-pro-001:generateContent
curl "https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/google-vertex-ai/v1/projects/{project_name}/locations/{region}/publishers/google/models/gemini-1.0-pro-001:generateContent" \ -H "Authorization: Bearer {vertex_api_key}" \ -H 'Content-Type: application/json' \ -d '{ "contents": { "role": "user", "parts": [ { "text": "Cloudflareについてもっと教えてください" } ] }'