Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Vercel AI SDK] instrumentation returns any #82

Open
Dam-Buty opened this issue Nov 14, 2024 · 0 comments
Open

[Vercel AI SDK] instrumentation returns any #82

Dam-Buty opened this issue Nov 14, 2024 · 0 comments

Comments

@Dam-Buty
Copy link
Contributor

As can be seen in the types in the bundle (node_modules/@literalai/client/dist/api-BjOrmyGi.d.ts on current version), the instrumented methods from the Vercel AI SDK are typed as any :

    readonly vercel: {
        instrument: <TFunction extends AllVercelFn>(fn: TFunction) => any;
    };

It should probably be TFunction ? This is impractical because in my client i have to type-cast the methods like so :

export const vercelClient = {
  generateText: literalAiClient.instrumentation.vercel.instrument(
    baseGenerateText,
  ) as typeof baseGenerateText,
  streamText: literalAiClient.instrumentation.vercel.instrument(
    baseStreamText,
  ) as typeof baseStreamText,
  // ...
}
@Dam-Buty Dam-Buty changed the title Vercel instrumentation returns any [Vercel AI SDK] instrumentation returns any Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant