Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
roodboi committed Jan 13, 2025
1 parent 199439a commit ff40a16
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions public-packages/llm-client/src/providers/google/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,8 @@ export class GoogleProvider extends GoogleGenerativeAI implements OpenAILikeClie
}

private cleanSchema(schema: Record<string, unknown>): Record<string, unknown> {
const { additionalProperties, ...rest } = schema
const { _additionalProperties, ...rest } = schema

// Handle nested properties
if (rest["properties"] && typeof rest["properties"] === "object") {
rest["properties"] = Object.entries(rest["properties"]).reduce(
(acc, [key, value]) => {
Expand All @@ -70,7 +69,6 @@ export class GoogleProvider extends GoogleGenerativeAI implements OpenAILikeClie
)
}

// Handle array items
if (rest["items"] && typeof rest["items"] === "object" && rest["items"] !== null) {
rest["items"] = this.cleanSchema(rest["items"] as Record<string, unknown>)
}
Expand Down

0 comments on commit ff40a16

Please sign in to comment.