You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`classToGeminiResponseSchema(target, options?)`: Generates Gemini response schema for new `@google/genai` API
679
687
-`classToGeminiOldTool(target, options?)`: Generates Google Gemini tool format for legacy `@google/generative-ai` API
680
688
-`classToGeminiOldResponseSchema(target, options?)`: Generates Gemini response schema for legacy `@google/generative-ai` API
689
+
-`classToGeminiVertexTool(target, options?)`: Generates Google Gemini tool format for `@google-cloud/vertexai` API *(Note: functionality implemented but not verified with real API calls)*
690
+
-`classToGeminiVertexResponseSchema(target, options?)`: Generates Gemini response schema for `@google-cloud/vertexai` API *(Note: functionality implemented but not verified with real API calls)*
681
691
682
692
#### JSON Schema to LLM Format Converters
683
693
@@ -686,9 +696,13 @@ roles: string[];
686
696
-`jsonSchemaToOpenAIResponseFormat(schema, metadata, options?)`: Converts JSON Schema to OpenAI response format for Chat Completions API
687
697
-`jsonSchemaToOpenAIResponseApiTextSchema(schema, metadata, options?)`: Converts JSON Schema to OpenAI text format for Response API
688
698
-`jsonSchemaToAnthropicTool(schema, metadata)`: Converts JSON Schema to Anthropic Claude tool format
689
-
-`jsonSchemaToGeminiTool(schema, metadata)`: Converts JSON Schema to Google Gemini tool format
690
-
-`jsonSchemaToGeminiResponseSchema(schema, metadata)`: Converts JSON Schema to Gemini response schema format
691
-
699
+
-`jsonSchemaToGeminiTool(schema, metadata)`: Converts JSON Schema to Google Gemini tool format for new `@google/genai` API
700
+
-`jsonSchemaToGeminiResponseSchema(schema, metadata)`: Converts JSON Schema to Gemini response schema format for new `@google/genai` API
701
+
-`jsonSchemaToGeminiOldTool(schema, metadata)`: Converts JSON Schema to Google Gemini old tool format for legacy `@google/generative-ai` API
702
+
-`jsonSchemaToGeminiOldResponseSchema(schema, metadata)`: Converts JSON Schema to Gemini old response schema format for legacy `@google/generative-ai` API
703
+
-`jsonSchemaToGeminiVertexTool(schema, metadata)`: Converts JSON Schema to Gemini tool format for `@google-cloud/vertexai` API *(Note: functionality implemented but not verified with real API calls)*
704
+
-`jsonSchemaToGeminiVertexResponseSchema(schema, metadata)`: Converts JSON Schema to Gemini response schema format for `@google-cloud/vertexai` API *(Note: functionality implemented but not verified with real API calls)*
705
+
692
706
#### LLM Format to JSON Schema Converters
693
707
694
708
-`openAIToolToJsonSchema(openAITool)`: Extracts JSON Schema and metadata from an OpenAI Chat Completions API tool
@@ -821,13 +835,14 @@ Google provides multiple API packages for working with Gemini models. Schema For
821
835
3. **Google Vertex AI**: `@google-cloud/vertexai`
822
836
- Enterprise API for Google Cloud Platform
823
837
- Requires GCP project and location settings
824
-
- Uses the same formats as the new `@google/genai` library
838
+
- Use `classToGeminiVertexTool` and `classToGeminiVertexResponseSchema`
839
+
- **Note**: Vertex AI support is implemented but not verified with actual API calls yet
840
+
- **Important**: Google may eventually deprecate this API in favor of `@google/genai`
825
841
- Example:
826
842
```typescript
827
843
import { VertexAI } from'@google-cloud/vertexai';
828
844
constvertexAI=newVertexAI({project, location});
829
-
// Same format which is supposed to works, but not verified yet.
0 commit comments