MCPcopy Create free account

hub / github.com/cohere-ai/cohere-typescript / functions

Functions463 in github.com/cohere-ai/cohere-typescript

↓ 70 callersMethodlist
* Returns a list of models available for use. * * @param {Cohere.ModelsListRequest} request * @param {ModelsClient.RequestOptions} requ
src/api/resources/models/client/Client.ts:160
↓ 66 callersMethodget
(path: string)
tests/mock-server/mockEndpointBuilder.ts:14
↓ 47 callersMethodfromPromise
* Creates an `HttpResponsePromise` from an existing promise. * * @param promise - A promise resolving to a `WithRawResponse` object. *
src/core/fetcher/HttpResponsePromise.ts:53
↓ 47 callersMethodgetAuthRequest
(arg?: { endpointMetadata?: EndpointMetadata })
src/core/auth/AuthProvider.ts:5
↓ 46 callersFunctionmergeHeaders
(...headersArray: (Record<string, unknown> | null | undefined)[])
src/core/headers.ts:1
↓ 45 callersFunctionhandleNonStatusCodeError
( error: core.Fetcher.Error, rawResponse: core.RawResponse, method: string, path: string, )
src/errors/handleNonStatusCodeError.ts:6
↓ 45 callersFunctionmergeOnlyDefinedHeaders
( ...headersArray: (Record<string, unknown> | null | undefined)[] )
src/core/headers.ts:18
↓ 29 callersMethodparse
* Parse a document image into structured output. Use `output_format` to select * blocks or markdown (default). * * Currently supports `
src/api/resources/v2/client/Client.ts:404
↓ 24 callersMethodentries
()
src/core/fetcher/Headers.ts:71
↓ 18 callersFunctiongetSchemaUtils
(schema: BaseSchema<Raw, Parsed>)
src/core/schemas/builders/schema-utils/getSchemaUtils.ts:19
↓ 16 callersFunctionobject
( schemas: T, )
src/core/schemas/builders/object/object.ts:31
↓ 15 callersFunctiongetErrorMessageForIncorrectType
(value: unknown, expectedType: string)
src/core/schemas/utils/getErrorMessageForIncorrectType.ts:1
↓ 15 callersFunctionitSchemaIdentity
( schema: Schema<T, T>, value: T, { title = "functions as identity", opts }: { title?: string; opt
tests/unit/schemas/utils/itSchema.ts:4
↓ 13 callersFunctionitSchema
( title: string, schema: Schema<Raw, Parsed>, { raw, parsed, opts,
tests/unit/schemas/utils/itSchema.ts:12
↓ 12 callersMethodhas
(name: string)
src/core/fetcher/Headers.ts:52
↓ 12 callersMethodkeys
()
src/core/fetcher/Headers.ts:77
↓ 10 callersMethoderror
* Logs an error message. * @param message - The message to log * @param args - Additional arguments to log
src/core/logging/logger.ts:39
↓ 10 callersMethodforEach
(callbackfn: (value: string, key: string, parent: Headers) => void, thisArg?: unknown)
src/core/fetcher/Headers.ts:62
↓ 10 callersFunctionitValidate
( title: string, schema: Schema<Raw, Parsed>, input: unknown, errors: ValidationError[], o
tests/unit/schemas/utils/itValidate.ts:4
↓ 10 callersFunctionmaybeSkipValidation
(schema: S)
src/core/schemas/utils/maybeSkipValidation.ts:3
↓ 10 callersFunctionnormalizeClientOptionsWithAuth
( options: T, )
src/BaseClient.ts:75
↓ 9 callersFunctioncreateIdentitySchemaCreator
( schemaType: SchemaType, validate: (value: unknown, opts?: SchemaOptions) => MaybeValid<T>, )
src/core/schemas/utils/createIdentitySchemaCreator.ts:5
↓ 8 callersMethodappend
(key: string, value: unknown)
src/core/form-data-utils/FormDataWrapper.ts:18
↓ 8 callersMethodbuild
()
tests/mock-server/mockEndpointBuilder.ts:51
↓ 8 callersMethodcreateServer
(options?: Partial<MockServerOptions>)
tests/mock-server/MockServerPool.ts:67
↓ 8 callersMethodjsonBody
(body: unknown, options?: WithJsonOptions)
tests/mock-server/mockEndpointBuilder.ts:29
↓ 8 callersMethodmockEndpoint
(options?: RequestHandlerOptions)
tests/mock-server/MockServer.ts:20
↓ 8 callersMethodrespondWith
()
tests/mock-server/mockEndpointBuilder.ts:34
↓ 8 callersMethodstatusCode
(statusCode: number)
tests/mock-server/mockEndpointBuilder.ts:37
↓ 8 callersFunctiontoJson
( value: unknown, replacer?: (this: unknown, key: string, value: unknown) => unknown, space?: stri
src/core/json.ts:8
↓ 7 callersMethoddecode
(line: string)
src/core/streaming-fetcher/streaming-utils.ts:303
↓ 7 callersFunctionfromJson
( text: string, reviver?: (this: unknown, key: string, value: unknown) => unknown, )
src/core/json.ts:22
↓ 7 callersFunctionproperty
( rawKey: RawKey, valueSchema: Schema<RawValue, ParsedValue>, )
src/core/schemas/builders/object/property.ts:3
↓ 7 callersFunctionstringLiteral
(literal: V)
src/core/schemas/builders/literals/stringLiteral.ts:5
↓ 6 callersMethoddebug
* Logs a debug message. * @param message - The message to log * @param args - Additional arguments to log
src/core/logging/logger.ts:21
↓ 6 callersMethodpost
(path: string)
tests/mock-server/mockEndpointBuilder.ts:15
↓ 5 callersMethodclose
()
tests/mock-server/MockServerPool.ts:100
↓ 5 callersMethoddelete
(path: string)
tests/mock-server/mockEndpointBuilder.ts:17
↓ 5 callersFunctiongetObjectLikeUtils
(schema: BaseSchema<Raw, Parsed>)
src/core/schemas/builders/object-like/getObjectLikeUtils.ts:11
↓ 5 callersFunctionisPlainObject
(value: unknown)
src/core/schemas/utils/isPlainObject.ts:2
↓ 5 callersMethodset
(name: string, value: string)
src/core/fetcher/Headers.ts:57
↓ 5 callersMethodshouldLog
* Checks if a log level should be output based on configuration. * @param level - The log level to check * @returns True if the level should
src/core/logging/logger.ts:104
↓ 4 callersMethodchat
* Generates a text response to a user message and streams it down, token by token. To learn how to use the Chat API with streaming follow our [Text Ge
src/api/resources/v2/client/Client.ts:263
↓ 4 callersMethoddecode
(chunk: Bytes)
src/core/streaming-fetcher/streaming-utils.ts:367
↓ 4 callersFunctionfetchOverride
(platform: AwsPlatform, { awsRegion, awsAccessKey, awsSecretKey, awsSessionToken, }: AwsProps)
src/aws-utils.ts:183
↓ 4 callersFunctiongetParseRequiredKeys
()
src/core/schemas/builders/object/object.ts:68
↓ 4 callersMethodisDebug
* Checks if debug logging is enabled. * @returns True if debug logs should be output
src/core/logging/logger.ts:112
↓ 4 callersFunctionitJson
( title: string, schema: Schema<Raw, Parsed>, { raw, parsed, opts, }:
tests/unit/schemas/utils/itSchema.ts:57
↓ 4 callersFunctionitParse
( title: string, schema: Schema<Raw, Parsed>, { raw, parsed, opts, }:
tests/unit/schemas/utils/itSchema.ts:34
↓ 4 callersFunctionitValidateJson
( title: string, schema: Schema<Raw, Parsed>, parsed: unknown, errors: ValidationError[],
tests/unit/schemas/utils/itValidate.ts:39
↓ 4 callersFunctionitValidateParse
( title: string, schema: Schema<Raw, Parsed>, raw: unknown, errors: ValidationError[], opt
tests/unit/schemas/utils/itValidate.ts:20
↓ 4 callersFunctionjoin
(base: string, ...segments: string[])
src/core/url/join.ts:1
↓ 4 callersFunctionlist
(schema: Schema<Raw, Parsed>)
src/core/schemas/builders/list/list.ts:6
↓ 4 callersFunctiontoQueryString
(obj: unknown, options?: QueryStringOptions)
src/core/url/qs.ts:64
↓ 4 callersMethodwarn
* Logs a warning message. * @param message - The message to log * @param args - Additional arguments to log
src/core/logging/logger.ts:33
↓ 3 callersMethodappendFile
(key: string, value: unknown, fileName?: string)
src/core/form-data-utils/FormDataWrapper.ts:20
↓ 3 callersMethodchat
* Generates a text response to a user message. * To learn how to use the Chat API and RAG follow our [Text Generation guides](https://docs.cohere
src/Client.ts:261
↓ 3 callersMethodchatStream
* Generates a text response to a user message. To learn how to use the Chat API and RAG follow our [Text Generation guides](https://docs.cohere.com/v2
src/api/resources/v2/client/Client.ts:31
↓ 3 callersMethodcreate
* Creates and executes a batch from an uploaded dataset of requests * * @param {Cohere.Batch} request * @param {BatchesClient.RequestOp
src/api/resources/batches/client/Client.ts:145
↓ 3 callersFunctioncreateLogger
(config?: LogConfig | Logger)
src/core/logging/logger.ts:185
↓ 3 callersFunctionfetcherImpl
(args: Fetcher.Args)
src/core/fetcher/Fetcher.ts:253
↓ 3 callersMethodflush
()
src/core/streaming-fetcher/streaming-utils.ts:446
↓ 3 callersMethodgenerate
* @deprecated * * <Warning> * This API is marked as "Legacy" and is no longer maintained. Follow the [migration guide](https://docs.coh
src/Client.ts:503
↓ 3 callersMethodgetRequest
()
src/core/form-data-utils/FormDataWrapper.ts:22
↓ 3 callersFunctiongetResponseBody
(response: Response, responseType?: string)
src/core/fetcher/getResponseBody.ts:4
↓ 3 callersMethodinfo
* Logs an info message. * @param message - The message to log * @param args - Additional arguments to log
src/core/logging/logger.ts:27
↓ 3 callersFunctionisBlob
(value: unknown)
src/core/file/file.ts:211
↓ 3 callersMethodisError
* Checks if error logging is enabled. * @returns True if error logs should be output
src/core/logging/logger.ts:169
↓ 3 callersFunctionisFile
(value: unknown)
src/core/file/file.ts:215
↓ 3 callersFunctionisNamedValue
(value: unknown)
src/core/form-data-utils/FormDataWrapper.ts:11
↓ 3 callersFunctionisProperty
(maybeProperty: unknown)
src/core/schemas/builders/object/property.ts:20
↓ 3 callersFunctionkeys
(object: T)
src/core/schemas/utils/keys.ts:1
↓ 3 callersFunctionmakeRequest
( fetchFn: (url: string, init: RequestInit) => Promise<Response>, url: string, method: string,
src/core/fetcher/makeRequest.ts:29
↓ 3 callersFunctionreadableStreamAsyncIterable
(stream: any)
src/core/stream/Stream.ts:206
↓ 3 callersFunctionrequestWithRetries
( requestFn: () => Promise<Response>, maxRetries: number = DEFAULT_MAX_RETRIES, )
src/core/fetcher/requestWithRetries.ts:47
↓ 3 callersMethodtoContainHeaders
(expectedHeaders: Record<string, string>)
tests/setup.ts:4
↓ 3 callersFunctiontransform
( schema: BaseSchema<Raw, Parsed>, transformer: SchemaTransformer<Parsed, Transformed>, )
src/core/schemas/builders/schema-utils/getSchemaUtils.ts:155
↓ 3 callersMethodunwrap
()
src/core/fetcher/HttpResponsePromise.ts:81
↓ 2 callersFunctionanySignal
(...args: AbortSignal[] | [AbortSignal[]])
src/core/fetcher/signals.ts:9
↓ 2 callersFunctionbase64Decode
(input: string)
src/core/base64.ts:20
↓ 2 callersFunctionbase64Encode
(input: string)
src/core/base64.ts:11
↓ 2 callersMethodcancel
()
src/core/streaming-fetcher/streaming-utils.ts:194
↓ 2 callersMethodcancel
* Cancels an in-progress batch * * @param {string} id - The batch ID. * @param {BatchesClient.RequestOptions} requestOptions - Request-
src/api/resources/batches/client/Client.ts:330
↓ 2 callersFunctionconstructLazyBaseSchema
( getter: SchemaGetter<Schema<Raw, Parsed>>, )
src/core/schemas/builders/lazy/lazy.ts:14
↓ 2 callersFunctioncreateRequestUrl
(baseUrl: string, queryParameters?: Record<string, unknown>)
src/core/fetcher/createRequestUrl.ts:3
↓ 2 callersMethoddecodeChunk
(chunk: any)
src/core/stream/Stream.ts:188
↓ 2 callersMethoddetokenize
* This endpoint takes tokens using byte-pair encoding and returns their text representation. To learn more about tokenization and byte pair encoding,
src/Client.ts:1271
↓ 2 callersFunctiondiscriminant
( parsedDiscriminant: ParsedDiscriminant, rawDiscriminant: RawDiscriminant, )
src/core/schemas/builders/union/discriminant.ts:1
↓ 2 callersMethodembed
* This endpoint returns text and image embeddings. An embedding is a list of floating point numbers that captures semantic information about the conte
src/Client.ts:636
↓ 2 callersMethodembed
* This endpoint returns text embeddings. An embedding is a list of floating point numbers that captures semantic information about the text that it re
src/api/resources/v2/client/Client.ts:535
↓ 2 callersFunctionentries
(object: T)
src/core/schemas/utils/entries.ts:1
↓ 2 callersFunctionenum_
(values: E)
src/core/schemas/builders/enum/enum.ts:5
↓ 2 callersFunctionfilterObject
(obj: T, keysToInclude: K[])
src/core/schemas/utils/filterObject.ts:1
↓ 2 callersMethodgenerateStream
* @deprecated * * <Warning> * This API is marked as "Legacy" and is no longer maintained. Follow the [migration guide](https://docs.coh
src/Client.ts:368
↓ 2 callersFunctiongetFetchFn
()
src/core/fetcher/getFetchFn.ts:1
↓ 2 callersFunctiongetFileWithMetadata
( file: Uploadable, { noSniffFileSize }: { noSniffFileSize?: boolean } = {}, )
src/core/file/file.ts:36
↓ 2 callersFunctiongetMemoizedSchema
(getter: SchemaGetter<SchemaType>)
src/core/schemas/builders/lazy/lazy.ts:26
↓ 2 callersFunctiongetNameFromPath
(path: string)
src/core/file/file.ts:159
↓ 2 callersFunctiongetObjectUtils
(schema: BaseObjectSchema<Raw, Parsed>)
src/core/schemas/builders/object/object.ts:306
↓ 2 callersFunctiongetRequestBody
({ body, type }: GetRequestBody.Args)
src/core/fetcher/getRequestBody.ts:11
next →1–100 of 463, ranked by callers