MCPcopy Create free account

hub / github.com/Writesonic/GPTRouter / functions

Functions106 in github.com/Writesonic/GPTRouter

↓ 10 callersFunctionupdateHealthCheck
(params: HealthCheckParams, orm: DataSource)
src/utils/updateHealthCheck.ts:19
↓ 6 callersFunctionvalidateData
(schema: TObject, data: any)
src/utils/schemaValidator.ts:11
↓ 4 callersFunctioncompleteHandler
({ providerName, modelName, promptParams, timeout, maxRetries, }: { providerName: string; modelN
src/handlers/completeHandler.ts:4
↓ 4 callersFunctiongenerateResponse
({ params, stream = false, isAzure = false, timeout, maxRetries, }: { params: ChatOpenaiInputParam
src/providers/chatOpenai/generate.ts:19
↓ 4 callersMethodget_one_public_subnet_from_az
Get subnet for the given availability zone from the VPC object. Args: vpc (ec2.Vpc): VPC object. az (str): Av
cdk_deployment/infra/model_router_stack.py:287
↓ 3 callersFunctiongenerateResponse
({ params, stream = false, timeout, maxRetries, }: { params: AnthropicInputParamsSchema; stream?:
src/providers/anthropic/generate.ts:19
↓ 3 callersFunctiongenerateResponse
({ params, stream = false, isAzure = false, timeout, maxRetries, }: { params: OpenaiInputParamsSch
src/providers/openai/generate.ts:17
↓ 3 callersMethodget_one_private_subnet_from_az
Get subnet for the given availability zone from the VPC object. Args: vpc (ec2.Vpc): VPC object. az (str): Av
cdk_deployment/infra/model_router_stack.py:272
↓ 3 callersFunctionpush
(value: any)
src/utils/createEventStream.ts:11
↓ 3 callersFunctionstreamHandler
({ providerName, modelName, promptParams, timeout, maxRetries, }: { providerName: string; modelN
src/handlers/streamHandler.ts:4
↓ 2 callersFunctioncheckAnthropicHealth
(orm: DataSource)
src/providers/anthropic/healthCheck.ts:15
↓ 2 callersFunctioncheckCohereHealth
(orm: DataSource)
src/providers/cohere/healthCheck.ts:14
↓ 2 callersFunctioncheckOpenaiHealth
(orm: DataSource)
src/providers/openai/healthCheck.ts:16
↓ 2 callersMethodcreateProvider
(providerName: string)
src/providers/factory.ts:14
↓ 2 callersFunctiongenerateResponse
({ params, stream = false, // TODO: Add timeout and maxRetries /* eslint-disable @typescript-eslint/no
src/providers/replicate/generate.ts:7
↓ 2 callersFunctiongenerateResponse
({ params, stream = false, timeout, maxRetries, }: { params: CohereInputParamsSchema; stream?: boo
src/providers/cohere/generate.ts:17
↓ 2 callersFunctiongetTokenUsage
(prompt: string, completion: string)
src/providers/anthropic/tokenUsage.ts:12
↓ 2 callersMethodtokenUsage
(params: AnthropicInputParamsSchema, completionText: string)
src/providers/anthropic/provider.ts:101
↓ 2 callersMethodtransform
(promptParams: BasePromptParams)
src/providers/cohere/provider.ts:40
↓ 2 callersMethodvalidateParams
(params: any)
src/providers/openai/provider.ts:13
↓ 1 callersFunctionbuildServer
* Initializes and configures the Fastify server, including database connection, * authentication, CORS settings, cron jobs, error handling, and route
src/server.ts:49
↓ 1 callersFunctioncheckOpenaiHealth
(orm: DataSource)
src/providers/chatOpenai/healthCheck.ts:18
↓ 1 callersFunctionchunksToLines
* Asynchronously converts a stream of chunks into lines. * @param {AsyncIterable<any>} chunksAsync - Stream of chunks to convert into lines. * @retu
src/utils/streamCompletion.ts:6
↓ 1 callersMethodconvertMessagesToAnthropicPrompt
(messages: Array<MessagesSchema>)
src/providers/anthropic/provider.ts:39
↓ 1 callersFunctioncreateEventStream
(url: string)
src/utils/createEventStream.ts:4
↓ 1 callersFunctiongenerateImagesWithDALL_E
( request: FastifyRequestTypebox<typeof GenerateImageResponseSchema>, reply: FastifyReplyTypebox<typeof Ge
src/controllers/generation.controller.ts:373
↓ 1 callersFunctiongenerateImagesWithStableDiffusion
( request: FastifyRequestTypebox<typeof GenerateImageResponseSchema>, reply: FastifyReplyTypebox<typeof Ge
src/controllers/generation.controller.ts:413
↓ 1 callersFunctiongetTokenUsage
(prompt: string, completion: string, model: string)
src/providers/openai/tokenUsage.ts:11
↓ 1 callersFunctiongetTokenUsage
(messages: any, completion: string, model: string)
src/providers/chatOpenai/tokenUsage.ts:12
↓ 1 callersFunctiongetTokenUsage
(prompt: string, completion: string)
src/providers/cohere/tokenUsage.ts:16
↓ 1 callersFunctioninitData
(orm: DataSource)
src/scripts/index.ts:11
↓ 1 callersFunctioninitModels
(orm: DataSource)
src/scripts/initModels.ts:12
↓ 1 callersFunctioninitProviders
(orm: DataSource)
src/scripts/initProviders.ts:12
↓ 1 callersFunctioninitRoutes
(server: FastifyInstance)
src/routes/index.ts:15
↓ 1 callersFunctioninitSwagger
(server: FastifyInstance)
src/swagger.ts:8
↓ 1 callersFunctionlinesToMessages
* Asynchronously converts a stream of lines into messages. * @param {AsyncIterable<any>} linesAsync - Stream of lines to convert into messages. * @r
src/utils/streamCompletion.ts:27
↓ 1 callersFunctionmain
* The entry point for initializing and starting the Fastify server. * It loads the server configuration, starts listening on a given port and sets up
src/index.ts:12
↓ 1 callersMethodperformGeneration
( params: OpenaiInputParamsSchema, timeout: number, maxRetries: number, )
src/providers/openai/provider.ts:17
↓ 1 callersMethodperformStreamGeneration
( params: OpenaiInputParamsSchema, timeout: number, maxRetries: number, )
src/providers/openai/provider.ts:39
↓ 1 callersFunctionpostData
()
docs/src/components/LandingPage/Cta.tsx:7
↓ 1 callersMethodtokenUsage
(params: ChatOpenaiInputParamsSchema, completionText: string)
src/providers/azureChatOpenAI/provider.ts:84
↓ 1 callersMethodtokenUsage
(params: OpenaiInputParamsSchema, completionText: string)
src/providers/openai/provider.ts:69
↓ 1 callersMethodtokenUsage
(params: ChatOpenaiInputParamsSchema, completionText: string)
src/providers/chatOpenai/provider.ts:73
↓ 1 callersMethodtokenUsage
(params: CohereInputParamsSchema, completionText: string)
src/providers/cohere/provider.ts:52
FunctionCTA
()
docs/src/components/LandingPage/Cta.tsx:4
FunctionFAQs
()
docs/src/components/LandingPage/Faqs.tsx:4
FunctionFooter
()
docs/src/components/LandingPage/Footer.tsx:3
FunctionHero
()
docs/src/components/LandingPage/Hero.tsx:3
FunctionHome
()
docs/src/pages/index.tsx:12
FunctionModels
()
docs/src/components/LandingPage/Models.tsx:3
FunctionStats
()
docs/src/components/LandingPage/Stats.tsx:3
Function[Symbol.asyncIterator]
()
src/utils/createEventStream.ts:6
Method__init__
(self, scope: Construct, construct_id: str, **kwargs)
cdk_deployment/infra/model_router_stack.py:62
FunctionconfigurePostCss
(postcssOptions)
docs/docusaurus.config.js:36
Methodconstructor
(statusCode: number, message: string)
src/library/customError.ts:13
FunctioncreatePrompt
( request: FastifyRequestTypebox<typeof CreatePromptSchema>, reply: FastifyReplyTypebox<typeof CreatePromp
src/controllers/prompt.controller.ts:82
FunctiondeletePrompt
( request: FastifyRequestTypebox<typeof DeletePromptSchema>, reply: FastifyReplyTypebox<typeof DeletePromp
src/controllers/prompt.controller.ts:133
Functiongenerate
( modelName: string, promptParams: BasePromptParams, timeout: number, maxRetries: number, )
src/providers/base.ts:12
FunctiongenerateImageResponse
( request: FastifyRequestTypebox<typeof GenerateImageResponseSchema>, reply: FastifyReplyTypebox<typeof Ge
src/controllers/generation.controller.ts:464
FunctiongenerateResponse
( request: FastifyRequestTypebox<typeof GenerateResponseSchema>, reply: FastifyReplyTypebox<typeof Generat
src/controllers/generation.controller.ts:44
FunctiongenerateResponseFromImage
( request: FastifyRequestTypebox<typeof GenerateFromImageResponseSchema>, reply: FastifyReplyTypebox<typeo
src/controllers/generation.controller.ts:476
FunctiongenerateResponseFromPrompt
( request: FastifyRequestTypebox<typeof GenerateFromPromptResponseSchema>, reply: FastifyReplyTypebox<type
src/controllers/generation.controller.ts:208
FunctiongenerateStream
( modelName: string, promptParams: BasePromptParams, timeout: number, maxRetries: number, )
src/providers/base.ts:24
FunctiongenerationRouter
* Attach generation routes to the Fastify server. * @param {FastifyInstance} server - The Fastify server instance. * @returns {Promise<void>} - A pr
src/routes/generation.route.ts:22
FunctiongetActiveProviders
( request: FastifyRequestTypebox<typeof GetAllProvidersSchema>, reply: FastifyReplyTypebox<typeof GetAllPr
src/controllers/provider.controller.ts:13
FunctiongetAllModels
( request: FastifyRequestTypebox<typeof GetAllModelsSchema>, reply: FastifyReplyTypebox<typeof GetAllModel
src/controllers/model.controller.ts:14
FunctiongetAllPrompts
( request: FastifyRequestTypebox<typeof GetAllPromptsSchema>, reply: FastifyReplyTypebox<typeof GetAllProm
src/controllers/prompt.controller.ts:25
FunctiongetHealthCheckData
( request: FastifyRequestTypebox<typeof GetHealthCheckDataSchema>, reply: FastifyReplyTypebox<typeof GetHe
src/controllers/healthCheck.controller.ts:47
FunctiongetModelById
( request: FastifyRequestTypebox<typeof GetModelByIdSchema>, reply: FastifyReplyTypebox<typeof GetModelByI
src/controllers/model.controller.ts:45
FunctiongetPromptById
( request: FastifyRequestTypebox<typeof GetPromptByIdSchema>, reply: FastifyReplyTypebox<typeof GetPromptB
src/controllers/prompt.controller.ts:53
FunctiongetUsageDataByModel
( request: FastifyRequestTypebox<typeof GetAllUsageByModelSchema>, reply: FastifyReplyTypebox<typeof GetAl
src/controllers/modelUsage.controller.ts:15
MethodhealthCheck
()
src/providers/replicate/provider.ts:71
MethodhealthCheck
(orm: DataSource)
src/providers/azureChatOpenAI/provider.ts:88
MethodhealthCheck
(orm: DataSource)
src/providers/anthropic/provider.ts:105
MethodhealthCheck
(orm: DataSource)
src/providers/openai/provider.ts:73
MethodhealthCheck
(orm: DataSource)
src/providers/chatOpenai/provider.ts:77
MethodhealthCheck
(orm: DataSource)
src/providers/cohere/provider.ts:56
FunctionhealthCheckRouter
* Define routes for health check endpoint * @param {FastifyInstance} server - The Fastify server instance * @returns {Promise<void>} - A Promise tha
src/routes/healthCheck.route.ts:11
FunctionmodelRouter
* Attach model routes to the Fastify server instance * @param {FastifyInstance} server - The Fastify server instance * @returns {Promise<void>}
src/routes/model.route.ts:11
FunctionmodelUsageRouter
* Adds route for getting usage data by model * * @param {FastifyInstance} server - The Fastify server instance * @returns {Promise<void>} - A promi
src/routes/modelUsage.route.ts:12
FunctionoptimizePrompt
( request: FastifyRequestTypebox<typeof OptimizePromptSchema>, reply: FastifyReplyTypebox<typeof OptimizeP
src/controllers/prompt.controller.ts:159
MethodperformGeneration
( params: ReplicateInputParamsSchema, timeout: number, maxRetries: number, )
src/providers/replicate/provider.ts:15
MethodperformGeneration
( params: ChatOpenaiInputParamsSchema, timeout: number, maxRetries: number, )
src/providers/azureChatOpenAI/provider.ts:17
MethodperformGeneration
( params: AnthropicInputParamsSchema, timeout: number, maxRetries: number, )
src/providers/anthropic/provider.ts:17
MethodperformGeneration
( params: ChatOpenaiInputParamsSchema, timeout: number, maxRetries: number, )
src/providers/chatOpenai/provider.ts:17
MethodperformGeneration
( params: CohereInputParamsSchema, timeout: number, maxRetries: number, )
src/providers/cohere/provider.ts:18
MethodperformStreamGeneration
( params: ReplicateInputParamsSchema, timeout: number, maxRetries: number, )
src/providers/replicate/provider.ts:35
MethodperformStreamGeneration
( params: ChatOpenaiInputParamsSchema, timeout: number, maxRetries: number, )
src/providers/azureChatOpenAI/provider.ts:47
MethodperformStreamGeneration
( params: AnthropicInputParamsSchema, timeout: number, maxRetries: number, )
src/providers/anthropic/provider.ts:71
MethodperformStreamGeneration
( params: ChatOpenaiInputParamsSchema, timeout: number, maxRetries: number, )
src/providers/chatOpenai/provider.ts:41
MethodperformStreamGeneration
()
src/providers/cohere/provider.ts:48
FunctionpromptRouter
* Registers prompt related routes and their corresponding handlers. * @param {FastifyInstance} server - The Fastify server instance. * @returns {voi
src/routes/prompt.route.ts:18
FunctionproviderRouter
* Define routes for handling provider related operations. * * @param {FastifyInstance} server - The Fastify server instance * @returns {Promise<voi
src/routes/provider.route.ts:12
FunctionstreamCompletion
(data: any)
src/utils/streamCompletion.ts:44
MethodtokenUsage
()
src/providers/replicate/provider.ts:66
Functiontransform
(promptParams: BasePromptParams)
src/providers/base.ts:8
Methodtransform
(promptParams: BasePromptParams)
src/providers/anthropic/provider.ts:57
FunctiontriggerHealthCheck
( request: FastifyRequestTypebox<typeof HealthCheckSchema>, reply: FastifyReplyTypebox<typeof HealthCheckS
src/controllers/healthCheck.controller.ts:20
FunctionupdatePrompt
( request: FastifyRequestTypebox<typeof UpdatePromptSchema>, reply: FastifyReplyTypebox<typeof UpdatePromp
src/controllers/prompt.controller.ts:101
FunctionuserRouter
* Handles the user routes for login * @param {FastifyInstance} server - The Fastify server instance * @returns {Promise<void>} - A Promise that reso
src/routes/user.route.ts:11
next →1–100 of 106, ranked by callers