[Vertex AI] Refactor Schema declarations (#13616)

This commit is contained in:
Andrew Heard authored and GitHub committed 2024-09-24 20:36:50 -04:00
1 parent 5fe65b9738
commit 5822291dff
5 files changed
+345 -45

No files matched your search

@@ -45,20 +45,15 @@ class FunctionCallingViewModel: ObservableObject {
name: "get_exchange_rate",
description: "Get the exchange rate for currencies between countries",
parameters: [
"currency_from": Schema(
type: .string,
format: "enum",
description: "The currency to convert from in ISO 4217 format",
enumValues: ["USD", "EUR", "JPY", "GBP", "AUD", "CAD"]
"currency_from": .enumeration(
values: ["USD", "EUR", "JPY", "GBP", "AUD", "CAD"],
description: "The currency to convert from in ISO 4217 format"
),
"currency_to": Schema(
type: .string,
format: "enum",
description: "The currency to convert to in ISO 4217 format",
enumValues: ["USD", "EUR", "JPY", "GBP", "AUD", "CAD"]
"currency_to": .enumeration(
values: ["USD", "EUR", "JPY", "GBP", "AUD", "CAD"],
description: "The currency to convert to in ISO 4217 format"
),
],
requiredParameters: ["currency_from", "currency_to"]
]
),
])]
)