Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/microsoft/TypeChat
/ functions
Functions
361 in github.com/microsoft/TypeChat
⨍
Functions
361
◇
Types & classes
298
↓ 41 callers
Function
append
(s: string)
typescript/src/zod/validate.ts:110
↓ 37 callers
Function
schemaOf
Runs getZodSchemaAsTypeScript on a single named type and returns the result.
typescript/test/zod.test.ts:11
↓ 32 callers
Function
log
(...args)
tools/scripts/fix-dependabot-alerts.mjs:86
↓ 22 callers
Method
complete
* 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 callers
Method
retrieveUser
()
typescript/examples/music/src/service.ts:44
↓ 18 callers
Function
setupFetch
(responses)
typescript/tests/model.test.mjs:73
↓ 17 callers
Function
createLanguageModel
(env: Record<string, string | undefined>)
typescript/src/model.ts:96
↓ 16 callers
Method
validate
* 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 callers
Function
createOpenAILanguageModel
(apiKey: string, model: string, endPoint = "https://api.openai.com/v1/chat/completions", org = "", useResponse
typescript/src/model.ts:130
↓ 15 callers
Method
translate
(request: string)
typescript/examples/healthData/src/translator.ts:14
↓ 13 callers
Function
python_type_to_typescript_schema
Converts a Python type to a TypeScript schema.
python/src/typechat/_internal/ts_conversion/__init__.py:23
↓ 13 callers
Method
translate
* 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 callers
Function
createJsonTranslator
(model: TypeChatLanguageModel, validator: TypeChatJsonValidator<T>)
typescript/src/typechat.ts:97
↓ 12 callers
Function
validatorFor
(schema: string, typeName: string)
typescript/test/validate.test.ts:46
↓ 11 callers
Function
createTypeScriptJsonValidator
(schema: string, typeName: string)
typescript/src/ts/validate.ts:35
↓ 11 callers
Function
createZodJsonValidator
(schema: T, typeName: K)
typescript/src/zod/validate.ts:14
↓ 11 callers
Function
error
(message: string)
typescript/src/result.ts:30
↓ 11 callers
Function
processRequests
(interactivePrompt: string, inputFileName: string | undefined, processRequest: (request: string) => Promise<vo
typescript/src/interactive/interactive.ts:12
↓ 9 callers
Function
appendType
(type: z.ZodType, minPrecedence = 0)
typescript/src/zod/validate.ts:123
↓ 9 callers
Function
create_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 callers
Function
process_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 callers
Function
run
(cmd, args, opts = {})
tools/scripts/fix-dependabot-alerts.mjs:109
↓ 8 callers
Function
makeChatCompletionsResponse
(content)
typescript/tests/model.test.mjs:18
↓ 8 callers
Function
makeResponsesAPIResponse
(text)
typescript/tests/model.test.mjs:32
↓ 8 callers
Function
printStatus
(context: IClientContext)
typescript/examples/music/src/playback.ts:42
↓ 7 callers
Method
getSchemaText
* Return a string containing TypeScript source code for the validation schema.
typescript/src/typechat.ts:73
↓ 7 callers
Function
getUrlWithParams
(urlString: string, queryParams: Record<string, any>)
typescript/examples/music/src/endpoints.ts:585
↓ 7 callers
Function
print_status
(context: ClientContext)
python/examples/music/client.py:170
↓ 7 callers
Method
register_agent
(self, name: str, description: str, handler: Callable[[str], Awaitable[Any]])
python/examples/multiSchema/router.py:27
↓ 7 callers
Method
start_playback
( self, device_id: str | None = None, context_uri: str | None = None, uris: li
python/examples/music/spotipyWrapper.py:55
↓ 7 callers
Function
success
(data: T)
typescript/src/result.ts:21
↓ 6 callers
Function
appendNewLine
()
typescript/src/zod/validate.ts:118
↓ 6 callers
Function
getTypeKind
(type: z.ZodType)
typescript/src/zod/validate.ts:38
↓ 5 callers
Method
add
Add two numbers
python/examples/math/schemaV2.py:10
↓ 5 callers
Method
getTracks
(service: SpotifyService)
typescript/examples/music/src/trackCollections.ts:6
↓ 5 callers
Function
getZodSchemaAsTypeScript
(schema: Record<string, z.ZodType>)
typescript/src/zod/validate.ts:80
↓ 5 callers
Function
get_tracks_from_result_list
(resultItems: list[Any])
python/examples/music/client.py:96
↓ 5 callers
Function
makeErrorResponse
(status, statusText, retryAfterSec = null)
typescript/tests/model.test.mjs:52
↓ 5 callers
Function
missingEnvironmentVariable
* Throws an exception for a missing environment variable.
typescript/src/model.ts:338
↓ 5 callers
Function
next
(service: SpotifyService, deviceId: string)
typescript/examples/music/src/endpoints.ts:402
↓ 5 callers
Function
printTrackNames
( tracks: SpotifyApi.TrackObjectFull[], context: IClientContext )
typescript/examples/music/src/main.ts:74
↓ 5 callers
Method
registerAgent
(name: string, agent: Agent<T>)
typescript/examples/multiSchema/src/router.ts:11
↓ 5 callers
Method
search
( self, q: str, limit: int = 10, offset: int = 0, type: str = "track", market: str | None = None )
python/examples/music/spotipyWrapper.py:35
↓ 5 callers
Method
translate
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 callers
Function
ts_type_to_str
(type_node: TypeNode)
python/src/typechat/_internal/ts_conversion/ts_node_to_string.py:30
↓ 5 callers
Function
update_track_list_and_print
(tracks: list[SimplifiedTrackInfo], context: ClientContext)
python/examples/music/client.py:149
↓ 4 callers
Method
close
()
typescript/examples/music/src/authz.ts:106
↓ 4 callers
Function
convert_to_type_node
(py_type: object)
python/src/typechat/_internal/ts_conversion/python_type_to_ts_nodes.py:210
↓ 4 callers
Function
createJsonPrintAgent
( name: string, description: string, model: TypeChatLanguageModel, schema: string, typeNam
typescript/examples/multiSchema/src/agent.ts:24
↓ 4 callers
Function
err
(...args)
tools/scripts/fix-dependabot-alerts.mjs:89
↓ 4 callers
Function
getDevices
(service: SpotifyService)
typescript/examples/music/src/endpoints.ts:279
↓ 4 callers
Function
getPlaybackState
(service: SpotifyService)
typescript/examples/music/src/endpoints.ts:186
↓ 4 callers
Method
getTypeName
* Return the name of the JSON object target type in the schema.
typescript/src/typechat.ts:77
↓ 4 callers
Function
makeFilterCombiner
(combinerType = FilterCombinerType.AND)
typescript/examples/music/src/trackFilter.ts:90
↓ 4 callers
Function
play
( service: SpotifyService, deviceId: string, uris?: string[], contextUri?: string, trackNu
typescript/examples/music/src/endpoints.ts:236
↓ 4 callers
Function
required_var
(name: str)
python/src/typechat/_internal/model.py:131
↓ 3 callers
Function
appendUnionOrIntersectionTypes
(types: readonly z.ZodType[], minPrecedence: TypePrecedence)
typescript/src/zod/validate.ts:219
↓ 3 callers
Function
check_snapshot_for_module_string_if_3_12_plus
(snapshot: Any, input_type_str: str, module_str: str)
python/tests/utilities.py:48
↓ 3 callers
Function
convert_to_type_reference_node
(py_type: TypeReferenceTarget)
python/src/typechat/_internal/ts_conversion/python_type_to_ts_nodes.py:174
↓ 3 callers
Function
createFileMapEntry
(filePath: string, fileText: string)
typescript/src/ts/validate.ts:132
↓ 3 callers
Function
createModuleTextFromProgram
(jsonObject: object)
typescript/src/ts/program.ts:86
↓ 3 callers
Function
createProgramTranslator
(model: TypeChatLanguageModel, schema: string)
typescript/src/ts/program.ts:196
↓ 3 callers
Method
devices
(self)
python/examples/music/spotipyWrapper.py:32
↓ 3 callers
Method
dirname
(cls, *, test_location: PyTestLocation)
python/tests/utilities.py:38
↓ 3 callers
Function
evaluateJsonProgram
(program: Program, onCall: (func: string, args: unknown[]) => Promise<unknown>)
typescript/src/ts/program.ts:147
↓ 3 callers
Function
getData
(result: Result<T>)
typescript/src/result.ts:40
↓ 3 callers
Function
get_current_users_playlists
(context: ClientContext)
python/examples/music/client.py:154
↓ 3 callers
Function
is_generic
(py_type: object)
python/src/typechat/_internal/ts_conversion/python_type_to_ts_nodes.py:93
↓ 3 callers
Function
reserve_name
(val: type | TypeAliasType)
python/src/typechat/_internal/ts_conversion/python_type_to_ts_nodes.py:337
↓ 3 callers
Function
skip_annotations
(py_type: object)
python/src/typechat/_internal/ts_conversion/python_type_to_ts_nodes.py:163
↓ 3 callers
Function
stroke
(style?: Style)
typescript/examples/drawing/src/render.ts:23
↓ 3 callers
Function
strokeWidth
(style?: Style)
typescript/examples/drawing/src/render.ts:27
↓ 3 callers
Function
warn
(...args)
tools/scripts/fix-dependabot-alerts.mjs:88
↓ 2 callers
Method
__init__
(self, model: TypeChatLanguageModel)
python/examples/multiSchema/agents.py:50
↓ 2 callers
Function
appendObjectType
(objectType: z.ZodType)
typescript/src/zod/validate.ts:188
↓ 2 callers
Function
appendTypeDefinition
(type: z.ZodType)
typescript/src/zod/validate.ts:136
↓ 2 callers
Function
arrayToString
(array: unknown[])
typescript/src/ts/program.ts:133
↓ 2 callers
Method
authenticate
(self)
python/examples/multiSchema/agents.py:105
↓ 2 callers
Function
comment_to_str
(comment_text: str, indentation: str)
python/src/typechat/_internal/ts_conversion/ts_node_to_string.py:21
↓ 2 callers
Function
createFetchLanguageModel
* Common OpenAI REST API endpoint encapsulation using the fetch API.
typescript/src/model.ts:162
↓ 2 callers
Method
createModuleTextFromJson
* 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 callers
Function
createProgramFromModuleText
(moduleText: string, oldProgram?: ts.Program)
typescript/src/ts/validate.ts:112
↓ 2 callers
Method
current_playback
(self, market: str | None = None, additional_types: str | None = None)
python/examples/music/spotipyWrapper.py:52
↓ 2 callers
Function
dbg
(...args)
tools/scripts/fix-dependabot-alerts.mjs:87
↓ 2 callers
Function
declare_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 callers
Function
escapeXml
(text: string)
typescript/examples/drawing/src/render.ts:3
↓ 2 callers
Function
evaluateArray
(array: unknown[])
typescript/src/ts/program.ts:183
↓ 2 callers
Function
evaluate_array
(array: Sequence[JsonValue])
python/examples/math/program.py:56
↓ 2 callers
Function
evaluate_expression
(expr: JsonValue)
python/examples/math/program.py:59
↓ 2 callers
Function
evaluate_json_program
( program: JsonProgram, onCall: Callable[[str, Sequence[JsonValue]], Awaitable[JsonValue]] )
python/examples/math/program.py:50
↓ 2 callers
Function
exprToString
(expr: unknown)
typescript/src/ts/program.ts:102
↓ 2 callers
Function
fill
(style?: Style)
typescript/examples/drawing/src/render.ts:31
↓ 2 callers
Method
getPlaylist
()
typescript/examples/music/src/trackCollections.ts:8
↓ 2 callers
Function
getPlaylists
(service: SpotifyService)
typescript/examples/music/src/endpoints.ts:426
↓ 2 callers
Function
getResolvedVersions
(workspaceDir, pkg)
tools/scripts/fix-dependabot-alerts.mjs:303
↓ 2 callers
Function
getRetryDelayMs
* 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 callers
Function
getTop
( service: SpotifyService, limit = limitMax, offset = 0 )
typescript/examples/music/src/endpoints.ts:33
↓ 2 callers
Method
getTrackCount
()
typescript/examples/music/src/trackCollections.ts:5
↓ 2 callers
Function
getTypeIdentity
(type: z.ZodType)
typescript/src/zod/validate.ts:42
↓ 2 callers
Function
get_client_context
(vals: dict[str, str | None])
python/examples/music/client.py:32
next →
1–100 of 361, ranked by callers