MCPcopy Create free account

hub / github.com/microsoft/TypeChat / functions

Functions361 in github.com/microsoft/TypeChat

↓ 41 callersFunctionappend
(s: string)
typescript/src/zod/validate.ts:110
↓ 37 callersFunctionschemaOf
Runs getZodSchemaAsTypeScript on a single named type and returns the result.
typescript/test/zod.test.ts:11
↓ 32 callersFunctionlog
(...args)
tools/scripts/fix-dependabot-alerts.mjs:86
↓ 22 callersMethodcomplete
* Obtains a completion from the language model for the given prompt. * @param prompt A prompt string or an array of prompt sections. If a string
typescript/src/model.ts:76
↓ 21 callersMethodretrieveUser
()
typescript/examples/music/src/service.ts:44
↓ 18 callersFunctionsetupFetch
(responses)
typescript/tests/model.test.mjs:73
↓ 17 callersFunctioncreateLanguageModel
(env: Record<string, string | undefined>)
typescript/src/model.ts:96
↓ 16 callersMethodvalidate
* Validates the given JSON object according to the associated TypeScript schema. Returns a * `Success<T>` object containing the JSON object if va
typescript/src/typechat.ts:85
↓ 15 callersFunctioncreateOpenAILanguageModel
(apiKey: string, model: string, endPoint = "https://api.openai.com/v1/chat/completions", org = "", useResponse
typescript/src/model.ts:130
↓ 15 callersMethodtranslate
(request: string)
typescript/examples/healthData/src/translator.ts:14
↓ 13 callersFunctionpython_type_to_typescript_schema
Converts a Python type to a TypeScript schema.
python/src/typechat/_internal/ts_conversion/__init__.py:23
↓ 13 callersMethodtranslate
* Translates a natural language request into an object of type `T`. If the JSON object returned by * the language model fails to validate and the
typescript/src/typechat.ts:63
↓ 12 callersFunctioncreateJsonTranslator
(model: TypeChatLanguageModel, validator: TypeChatJsonValidator<T>)
typescript/src/typechat.ts:97
↓ 12 callersFunctionvalidatorFor
(schema: string, typeName: string)
typescript/test/validate.test.ts:46
↓ 11 callersFunctioncreateTypeScriptJsonValidator
(schema: string, typeName: string)
typescript/src/ts/validate.ts:35
↓ 11 callersFunctioncreateZodJsonValidator
(schema: T, typeName: K)
typescript/src/zod/validate.ts:14
↓ 11 callersFunctionerror
(message: string)
typescript/src/result.ts:30
↓ 11 callersFunctionprocessRequests
(interactivePrompt: string, inputFileName: string | undefined, processRequest: (request: string) => Promise<vo
typescript/src/interactive/interactive.ts:12
↓ 9 callersFunctionappendType
(type: z.ZodType, minPrecedence = 0)
typescript/src/zod/validate.ts:123
↓ 9 callersFunctioncreate_language_model
Creates a language model encapsulation of an OpenAI or Azure OpenAI REST API endpoint chosen by a dictionary of variables (typically just `os
python/src/typechat/_internal/model.py:113
↓ 9 callersFunctionprocess_requests
A request processor for interactive input or input from a text file. If an input file name is specified, the callback function is invoked for
python/src/typechat/_internal/interactive.py:3
↓ 9 callersFunctionrun
(cmd, args, opts = {})
tools/scripts/fix-dependabot-alerts.mjs:109
↓ 8 callersFunctionmakeChatCompletionsResponse
(content)
typescript/tests/model.test.mjs:18
↓ 8 callersFunctionmakeResponsesAPIResponse
(text)
typescript/tests/model.test.mjs:32
↓ 8 callersFunctionprintStatus
(context: IClientContext)
typescript/examples/music/src/playback.ts:42
↓ 7 callersMethodgetSchemaText
* Return a string containing TypeScript source code for the validation schema.
typescript/src/typechat.ts:73
↓ 7 callersFunctiongetUrlWithParams
(urlString: string, queryParams: Record<string, any>)
typescript/examples/music/src/endpoints.ts:585
↓ 7 callersFunctionprint_status
(context: ClientContext)
python/examples/music/client.py:170
↓ 7 callersMethodregister_agent
(self, name: str, description: str, handler: Callable[[str], Awaitable[Any]])
python/examples/multiSchema/router.py:27
↓ 7 callersMethodstart_playback
( self, device_id: str | None = None, context_uri: str | None = None, uris: li
python/examples/music/spotipyWrapper.py:55
↓ 7 callersFunctionsuccess
(data: T)
typescript/src/result.ts:21
↓ 6 callersFunctionappendNewLine
()
typescript/src/zod/validate.ts:118
↓ 6 callersFunctiongetTypeKind
(type: z.ZodType)
typescript/src/zod/validate.ts:38
↓ 5 callersMethodadd
Add two numbers
python/examples/math/schemaV2.py:10
↓ 5 callersMethodgetTracks
(service: SpotifyService)
typescript/examples/music/src/trackCollections.ts:6
↓ 5 callersFunctiongetZodSchemaAsTypeScript
(schema: Record<string, z.ZodType>)
typescript/src/zod/validate.ts:80
↓ 5 callersFunctionget_tracks_from_result_list
(resultItems: list[Any])
python/examples/music/client.py:96
↓ 5 callersFunctionmakeErrorResponse
(status, statusText, retryAfterSec = null)
typescript/tests/model.test.mjs:52
↓ 5 callersFunctionmissingEnvironmentVariable
* Throws an exception for a missing environment variable.
typescript/src/model.ts:338
↓ 5 callersFunctionnext
(service: SpotifyService, deviceId: string)
typescript/examples/music/src/endpoints.ts:402
↓ 5 callersFunctionprintTrackNames
( tracks: SpotifyApi.TrackObjectFull[], context: IClientContext )
typescript/examples/music/src/main.ts:74
↓ 5 callersMethodregisterAgent
(name: string, agent: Agent<T>)
typescript/examples/multiSchema/src/router.ts:11
↓ 5 callersMethodsearch
( self, q: str, limit: int = 10, offset: int = 0, type: str = "track", market: str | None = None )
python/examples/music/spotipyWrapper.py:35
↓ 5 callersMethodtranslate
Translates a natural language request into an object of type `T`. If the JSON object returned by the language model fails to validate
python/src/typechat/_internal/translator.py:52
↓ 5 callersFunctionts_type_to_str
(type_node: TypeNode)
python/src/typechat/_internal/ts_conversion/ts_node_to_string.py:30
↓ 5 callersFunctionupdate_track_list_and_print
(tracks: list[SimplifiedTrackInfo], context: ClientContext)
python/examples/music/client.py:149
↓ 4 callersMethodclose
()
typescript/examples/music/src/authz.ts:106
↓ 4 callersFunctionconvert_to_type_node
(py_type: object)
python/src/typechat/_internal/ts_conversion/python_type_to_ts_nodes.py:210
↓ 4 callersFunctioncreateJsonPrintAgent
( name: string, description: string, model: TypeChatLanguageModel, schema: string, typeNam
typescript/examples/multiSchema/src/agent.ts:24
↓ 4 callersFunctionerr
(...args)
tools/scripts/fix-dependabot-alerts.mjs:89
↓ 4 callersFunctiongetDevices
(service: SpotifyService)
typescript/examples/music/src/endpoints.ts:279
↓ 4 callersFunctiongetPlaybackState
(service: SpotifyService)
typescript/examples/music/src/endpoints.ts:186
↓ 4 callersMethodgetTypeName
* Return the name of the JSON object target type in the schema.
typescript/src/typechat.ts:77
↓ 4 callersFunctionmakeFilterCombiner
(combinerType = FilterCombinerType.AND)
typescript/examples/music/src/trackFilter.ts:90
↓ 4 callersFunctionplay
( service: SpotifyService, deviceId: string, uris?: string[], contextUri?: string, trackNu
typescript/examples/music/src/endpoints.ts:236
↓ 4 callersFunctionrequired_var
(name: str)
python/src/typechat/_internal/model.py:131
↓ 3 callersFunctionappendUnionOrIntersectionTypes
(types: readonly z.ZodType[], minPrecedence: TypePrecedence)
typescript/src/zod/validate.ts:219
↓ 3 callersFunctioncheck_snapshot_for_module_string_if_3_12_plus
(snapshot: Any, input_type_str: str, module_str: str)
python/tests/utilities.py:48
↓ 3 callersFunctionconvert_to_type_reference_node
(py_type: TypeReferenceTarget)
python/src/typechat/_internal/ts_conversion/python_type_to_ts_nodes.py:174
↓ 3 callersFunctioncreateFileMapEntry
(filePath: string, fileText: string)
typescript/src/ts/validate.ts:132
↓ 3 callersFunctioncreateModuleTextFromProgram
(jsonObject: object)
typescript/src/ts/program.ts:86
↓ 3 callersFunctioncreateProgramTranslator
(model: TypeChatLanguageModel, schema: string)
typescript/src/ts/program.ts:196
↓ 3 callersMethoddevices
(self)
python/examples/music/spotipyWrapper.py:32
↓ 3 callersMethoddirname
(cls, *, test_location: PyTestLocation)
python/tests/utilities.py:38
↓ 3 callersFunctionevaluateJsonProgram
(program: Program, onCall: (func: string, args: unknown[]) => Promise<unknown>)
typescript/src/ts/program.ts:147
↓ 3 callersFunctiongetData
(result: Result<T>)
typescript/src/result.ts:40
↓ 3 callersFunctionget_current_users_playlists
(context: ClientContext)
python/examples/music/client.py:154
↓ 3 callersFunctionis_generic
(py_type: object)
python/src/typechat/_internal/ts_conversion/python_type_to_ts_nodes.py:93
↓ 3 callersFunctionreserve_name
(val: type | TypeAliasType)
python/src/typechat/_internal/ts_conversion/python_type_to_ts_nodes.py:337
↓ 3 callersFunctionskip_annotations
(py_type: object)
python/src/typechat/_internal/ts_conversion/python_type_to_ts_nodes.py:163
↓ 3 callersFunctionstroke
(style?: Style)
typescript/examples/drawing/src/render.ts:23
↓ 3 callersFunctionstrokeWidth
(style?: Style)
typescript/examples/drawing/src/render.ts:27
↓ 3 callersFunctionwarn
(...args)
tools/scripts/fix-dependabot-alerts.mjs:88
↓ 2 callersMethod__init__
(self, model: TypeChatLanguageModel)
python/examples/multiSchema/agents.py:50
↓ 2 callersFunctionappendObjectType
(objectType: z.ZodType)
typescript/src/zod/validate.ts:188
↓ 2 callersFunctionappendTypeDefinition
(type: z.ZodType)
typescript/src/zod/validate.ts:136
↓ 2 callersFunctionarrayToString
(array: unknown[])
typescript/src/ts/program.ts:133
↓ 2 callersMethodauthenticate
(self)
python/examples/multiSchema/agents.py:105
↓ 2 callersFunctioncomment_to_str
(comment_text: str, indentation: str)
python/src/typechat/_internal/ts_conversion/ts_node_to_string.py:21
↓ 2 callersFunctioncreateFetchLanguageModel
* Common OpenAI REST API endpoint encapsulation using the fetch API.
typescript/src/model.ts:162
↓ 2 callersMethodcreateModuleTextFromJson
* Transform JSON into TypeScript code for validation. Returns a `Success<string>` object if the conversion is * successful, or an `Error` object
typescript/src/ts/validate.ts:25
↓ 2 callersFunctioncreateProgramFromModuleText
(moduleText: string, oldProgram?: ts.Program)
typescript/src/ts/validate.ts:112
↓ 2 callersMethodcurrent_playback
(self, market: str | None = None, additional_types: str | None = None)
python/examples/music/spotipyWrapper.py:52
↓ 2 callersFunctiondbg
(...args)
tools/scripts/fix-dependabot-alerts.mjs:87
↓ 2 callersFunctiondeclare_property
Declare a property for a given type. If 'optionality_default' is
python/src/typechat/_internal/ts_conversion/python_type_to_ts_nodes.py:295
↓ 2 callersFunctionescapeXml
(text: string)
typescript/examples/drawing/src/render.ts:3
↓ 2 callersFunctionevaluateArray
(array: unknown[])
typescript/src/ts/program.ts:183
↓ 2 callersFunctionevaluate_array
(array: Sequence[JsonValue])
python/examples/math/program.py:56
↓ 2 callersFunctionevaluate_expression
(expr: JsonValue)
python/examples/math/program.py:59
↓ 2 callersFunctionevaluate_json_program
( program: JsonProgram, onCall: Callable[[str, Sequence[JsonValue]], Awaitable[JsonValue]] )
python/examples/math/program.py:50
↓ 2 callersFunctionexprToString
(expr: unknown)
typescript/src/ts/program.ts:102
↓ 2 callersFunctionfill
(style?: Style)
typescript/examples/drawing/src/render.ts:31
↓ 2 callersMethodgetPlaylist
()
typescript/examples/music/src/trackCollections.ts:8
↓ 2 callersFunctiongetPlaylists
(service: SpotifyService)
typescript/examples/music/src/endpoints.ts:426
↓ 2 callersFunctiongetResolvedVersions
(workspaceDir, pkg)
tools/scripts/fix-dependabot-alerts.mjs:303
↓ 2 callersFunctiongetRetryDelayMs
* Returns the number of milliseconds to wait before the next retry attempt. * When the response carries a `Retry-After` header (sent by servers on 42
typescript/src/model.ts:287
↓ 2 callersFunctiongetTop
( service: SpotifyService, limit = limitMax, offset = 0 )
typescript/examples/music/src/endpoints.ts:33
↓ 2 callersMethodgetTrackCount
()
typescript/examples/music/src/trackCollections.ts:5
↓ 2 callersFunctiongetTypeIdentity
(type: z.ZodType)
typescript/src/zod/validate.ts:42
↓ 2 callersFunctionget_client_context
(vals: dict[str, str | None])
python/examples/music/client.py:32
next →1–100 of 361, ranked by callers