We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
countToken()
1 parent eb820bb commit 4be82b3Copy full SHA for 4be82b3
1 file changed
packages/ai/lib/methods/count-tokens.ts
@@ -21,6 +21,15 @@ import { ApiSettings } from '../types/internal';
21
import { BackendType } from '../public-types';
22
import * as GoogleAIMapper from '../googleai-mappers';
23
24
+/**
25
+ * Counts the number of tokens in a request body.
26
+ *
27
+ * @param apiSettings The {@link ApiSettings} to use for the request.
28
+ * @param model The model to use for the request.
29
+ * @param params The {@link CountTokensRequest} to send.
30
+ * @param requestOptions The {@link RequestOptions} to use for the request.
31
+ * @returns The {@link CountTokensResponse} from the request.
32
+ */
33
export async function countTokens(
34
apiSettings: ApiSettings,
35
model: string,
0 commit comments