Skip to content

Commit

Permalink
chore(llms): return driver response type
Browse files Browse the repository at this point in the history
Signed-off-by: Tomas Dvorak <[email protected]>
  • Loading branch information
Tomas2D committed Dec 9, 2024
1 parent 8b740d4 commit 28293a6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/llms/drivers/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

import { AnySchemaLike, createSchemaValidator, toJsonSchema } from "@/internals/helpers/schema.js";
import { createSchemaValidator, toJsonSchema } from "@/internals/helpers/schema.js";
import { GenerateOptions, LLMError } from "@/llms/base.js";
import { ChatLLM, ChatLLMOutput } from "@/llms/chat.js";
import { BaseMessage, Role } from "@/llms/primitives/message.js";
Expand Down Expand Up @@ -62,7 +62,7 @@ Validation Errors: "{{errors}}"`,
}

async generate<T = any>(
schema: T extends AnySchemaLike ? T : SchemaObject,
schema: T extends ZodTypeAny ? T : SchemaObject,
input: BaseMessage[],
{ maxRetries = 3, options }: GenerateSchemaInput<TGenerateOptions> = {},
): Promise<DriverResponse<T>> {
Expand Down

0 comments on commit 28293a6

Please sign in to comment.