Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion typespec/agents/models.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ model Agent {
"model": string = "";

/** Instructions for the agent */
instructions: string | string[] = #[];
instructions: string | string[] = [];

/** Default settings for all sessions created by this agent */
default_settings?: Record<unknown>;
Expand Down
8 changes: 4 additions & 4 deletions typespec/chat/models.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ model CommonChatSettings {

/** Up to 4 sequences where the API will stop generating further tokens. */
@maxItems(4)
stop: string[] = #[];
stop: string[] = [];

/** If specified, the system will make a best effort to sample deterministically for that particular seed value */
@minValue(-1)
Expand Down Expand Up @@ -234,11 +234,11 @@ model BaseChatResponse {

/** Background job IDs that may have been spawned from this interaction. */
@visibility("read")
jobs: uuid[] = #[];
jobs: uuid[] = [];

/** Documents referenced for this request (for citation purposes). */
@visibility("read")
docs: DocReference[] = #[];
docs: DocReference[] = [];

...HasCreatedAt;
...HasId;
Expand All @@ -263,5 +263,5 @@ alias ChatResponse = ChunkChatResponse | MessageChatResponse;
model RenderResponse extends ChatInputData {
/** Documents referenced for this request (for citation purposes). */
@visibility("read")
docs: DocReference[] = #[];
docs: DocReference[] = [];
}
2 changes: 1 addition & 1 deletion typespec/common/mixins.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,5 @@ model HasMetadata {
model HasJobs {
/** IDs (if any) of jobs created as part of this request */
@visibility("read")
jobs: uuid[] = #[];
jobs: uuid[] = [];
}
2 changes: 1 addition & 1 deletion typespec/common/types.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ model PaginationOptions {
@query direction: sortDirection = "asc",

/** Object to filter results by metadata */
@query metadata_filter: Record<unknown> = #{},
@query metadata_filter: Record<unknown> = {},
}

@events
Expand Down
4 changes: 2 additions & 2 deletions typespec/docs/models.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ model BaseDocSearchRequest {
lang: string = "en-US";

/** Metadata filter to apply to the search */
metadata_filter: MetadataFilter = #{};
metadata_filter: MetadataFilter = {};
}

model VectorDocSearchRequest extends BaseDocSearchRequest {
Expand Down Expand Up @@ -192,7 +192,7 @@ model DocSearchResponse {

model BulkDeleteDocsRequest {
/** Metadata filter to apply to the search */
metadata_filter: MetadataFilter = #{};
metadata_filter: MetadataFilter = {};

/** Delete all docs */
delete_all: boolean = false;
Expand Down
2 changes: 1 addition & 1 deletion typespec/entries/models.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ model ChatMLMessage<T extends string = string> {
continue?: boolean;

/** Tool calls generated by the model. */
tool_calls?: ChosenToolCall[] | null = #[];
tool_calls?: ChosenToolCall[] | null = [];

...HasCreatedAtOptional;
...HasIdOptional;
Expand Down
16 changes: 8 additions & 8 deletions typespec/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
"version": "0.4.0",
"type": "module",
"dependencies": {
"@typespec/compiler": "0.61.x",
"@typespec/events": "0.61.x",
"@typespec/http": "0.61.x",
"@typespec/openapi": "0.61.x",
"@typespec/openapi3": "0.61.x",
"@typespec/rest": "0.61.x",
"@typespec/sse": "0.61.x",
"@typespec/versioning": "0.61.x",
"@typespec/compiler": "^1.0.0",
"@typespec/events": "^1.0.0",
"@typespec/http": "^1.0.1",
"@typespec/openapi": "^1.0.0",
"@typespec/openapi3": "^1.0.0",
"@typespec/rest": "^1.0.0",
"@typespec/sse": "^1.0.0",
"@typespec/versioning": "^1.0.0",
"typespec-compiler-new": "npm:@typespec/compiler@^1.0.0",
"typespec-http-new": "npm:@typespec/http@^1.0.1",
"typespec-openapi-new": "npm:@typespec/openapi@^1.0.0",
Expand Down
2 changes: 1 addition & 1 deletion typespec/sessions/models.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ model BaseDocSearch {
lang: string = "en-US";

/** Metadata filter to apply to the search */
metadata_filter: MetadataFilter = #{};
metadata_filter: MetadataFilter = {};

/** The number of search messages to use for the search. */
@minValue(1)
Expand Down
2 changes: 1 addition & 1 deletion typespec/tasks/models.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ model Task {
input_schema: Record<unknown> | null = null;

/** Tools defined specifically for this task not included in the Agent itself. */
tools: TaskTool[] = #[];
tools: TaskTool[] = [];

/** Whether to inherit tools from the parent agent or not. Defaults to false. */
inherit_tools: boolean = false;
Expand Down
2 changes: 1 addition & 1 deletion typespec/tasks/steps.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ model MapReduceStep<Value = unknown, Accumulator = Array<Value>> extends BaseWor
reduce?: ReduceExpression<Value, Accumulator>;

/** The initial value of the reduce expression */
initial?: unknown = #[];
initial?: unknown = [];

/** Whether to run the reduce expression in parallel and how many items to run in each batch */
@minValue(1)
Expand Down
6 changes: 3 additions & 3 deletions typespec/tools/algolia.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ model AlgoliaIntegrationDef extends BaseIntegrationDef {
model AlgoliaProviderCard extends BaseProviderCard {
provider: "algolia" = "algolia";
setup: AlgoliaSetup;
methods: ProviderMethod<AlgoliaSearchArguments, AlgoliaSearchOutput>[] = #[
#{
methods: ProviderMethod<AlgoliaSearchArguments, AlgoliaSearchOutput>[] = [
{
method: "search",
description: "Search for content in an Algolia index",
}
];
info: ProviderInfo = #{
info: ProviderInfo = {
url: "https://www.algolia.com/",
docs: "https://www.algolia.com/doc/",
icon: "https://www.algolia.com/favicon.ico",
Expand Down
6 changes: 3 additions & 3 deletions typespec/tools/arxiv.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ model ArxivSearchOutput {
model ArxivProviderCard extends BaseProviderCard {
provider: "arxiv" = "arxiv";
setup: null = null;
methods: ProviderMethod<ArxivSearchArguments, ArxivSearchOutput>[] = #[
#{
methods: ProviderMethod<ArxivSearchArguments, ArxivSearchOutput>[] = [
{
method: "search",
description: "Search with Arxiv",
}
];
info: ProviderInfo = #{
info: ProviderInfo = {
url: "https://pypi.org/project/arxiv/",
docs: "https://info.arxiv.org/help/api/index.html",
icon: "https://arxiv.com/favicon.ico",
Expand Down
6 changes: 3 additions & 3 deletions typespec/tools/brave.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ model BraveSearchOutput {
model BraveProviderCard extends BaseProviderCard {
provider: "brave" = "brave";
setup: BraveSearchSetup;
methods: ProviderMethod<BraveSearchArguments, BraveSearchOutput>[] = #[
#{
methods: ProviderMethod<BraveSearchArguments, BraveSearchOutput>[] = [
{
method: "search",
description: "Search with Brave",
}
];
info: ProviderInfo = #{
info: ProviderInfo = {
url: "https://brave.com/",
docs: "https://brave.com/docs/",
icon: "https://brave.com/favicon.ico",
Expand Down
16 changes: 8 additions & 8 deletions typespec/tools/browserbase/main.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -61,32 +61,32 @@ alias BrowserbaseOutput = BrowserbaseSessionOutput | BrowserbaseContextOutput |
model BrowserbaseProviderCard extends BaseProviderCard {
provider: "browserbase" = "browserbase";
setup: BrowserbaseSetup;
methods: ProviderMethod<BrowserbaseArguments, BrowserbaseOutput>[] = #[
#{
methods: ProviderMethod<BrowserbaseArguments, BrowserbaseOutput>[] = [
{
method: "list_sessions",
description: "List the sessions in the browserbase context",
},
#{
{
method: "create_session",
description: "Create a new session in the browserbase context",
},
#{
{
method: "get_session",
description: "Get a session from the browserbase context",
},
#{
{
method: "complete_session",
description: "Complete a session in the browserbase context",
},
#{
{
method: "get_live_urls",
description: "Get live URLs from the browserbase context",
},
#{
{
method: "install_extension_from_github",
description: "Install an extension from GitHub to the browserbase context",
},
#{
{
method: "get_connect_url",
description: "Get the connection URL for a session",
}
Expand Down
4 changes: 2 additions & 2 deletions typespec/tools/browserbase/sessions.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ model BrowserbaseCreateSessionArguments {
extensionId?: string;

/** Browser settings */
browserSettings?: Record<unknown> = #{};
browserSettings?: Record<unknown> = {};

/** Duration in seconds after which the session will automatically end. Defaults to the Project's defaultTimeout. */
timeout?: uint16 = 3600;
Expand Down Expand Up @@ -201,5 +201,5 @@ model BrowserbaseGetSessionLiveUrlsOutput {
title?: string;
debuggerUrl?: url;
debuggerFullscreenUrl?: url;
}[] = #[];
}[] = [];
}
8 changes: 4 additions & 4 deletions typespec/tools/cloudinary.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -103,17 +103,17 @@ alias CloudinaryOutput = CloudinaryUploadOutput | CloudinaryEditOutput;
model CloudinaryProviderCard extends BaseProviderCard {
provider: "cloudinary" = "cloudinary";
setup: CloudinarySetup;
methods: ProviderMethod<CloudinaryUploadArguments | CloudinaryEditArguments, CloudinaryOutput>[] = #[
#{
methods: ProviderMethod<CloudinaryUploadArguments | CloudinaryEditArguments, CloudinaryOutput>[] = [
{
method: "media_upload",
description: "Upload media to Cloudinary",
},
#{
{
method: "media_edit",
description: "Edit media in Cloudinary",
}
];
info: ProviderInfo = #{
info: ProviderInfo = {
url: "https://cloudinary.com/",
docs: "https://cloudinary.com/documentation/python_quickstart",
icon: "https://cloudinary.com/favicon.ico",
Expand Down
6 changes: 3 additions & 3 deletions typespec/tools/email.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@ model EmailIntegrationDef extends BaseIntegrationDef {
model EmailProviderCard extends BaseProviderCard {
provider: "email" = "email";
setup: EmailSetup;
methods: ProviderMethod<EmailArguments, EmailOutput>[] = #[
#{
methods: ProviderMethod<EmailArguments, EmailOutput>[] = [
{
method: "send",
description: "Send an email",
}
];
info: ProviderInfo = #{
info: ProviderInfo = {
url: "https://emailservice.com/",
docs: "https://emailservice.com/docs/",
icon: "https://emailservice.com/favicon.ico",
Expand Down
6 changes: 3 additions & 3 deletions typespec/tools/ffmpeg.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ model FfmpegIntegrationDef extends BaseIntegrationDef {
model FfmpegProviderCard extends BaseProviderCard {
provider: "ffmpeg" = "ffmpeg";
setup: null = null;
methods: ProviderMethod<FfmpegSearchArguments, FfmpegSearchOutput>[] = #[
#{
methods: ProviderMethod<FfmpegSearchArguments, FfmpegSearchOutput>[] = [
{
method: "bash_cmd",
description: "Run FFmpeg bash command",
}
];
info: ProviderInfo = #{
info: ProviderInfo = {
url: "https://ffmpeg.org/",
docs: "https://ffmpeg.org/documentation.html",
icon: "https://upload.wikimedia.org/wikipedia/commons/5/5f/FFmpeg_Logo_new.svg",
Expand Down
6 changes: 3 additions & 3 deletions typespec/tools/llama_parse.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ model LlamaParseIntegrationDef extends BaseIntegrationDef {
model LlamaParseProviderCard extends BaseProviderCard {
provider: "llama_parse" = "llama_parse";
setup: LlamaParseSetup;
methods: ProviderMethod<LlamaParseFetchArguments, LlamaParseFetchOutput>[] = #[
#{
methods: ProviderMethod<LlamaParseFetchArguments, LlamaParseFetchOutput>[] = [
{
method: "parse",
description: "Parse and Extract the Files",
}
];
info: ProviderInfo = #{
info: ProviderInfo = {
url: "https://www.llamaindex.ai/",
docs: "https://docs.cloud.llamaindex.ai/llamaparse/getting_started",
icon: "https://www.llamaindex.ai/favicon.ico",
Expand Down
6 changes: 3 additions & 3 deletions typespec/tools/mailgun.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,13 @@ model MailgunIntegrationDef extends BaseIntegrationDef {
model MailgunProviderCard extends BaseProviderCard {
provider: "mailgun" = "mailgun";
setup: MailgunSetup;
methods: ProviderMethod<MailgunSendEmailArguments, MailgunSendEmailOutput>[] = #[
#{
methods: ProviderMethod<MailgunSendEmailArguments, MailgunSendEmailOutput>[] = [
{
method: "send_email",
description: "Send an email using Mailgun",
}
];
info: ProviderInfo = #{
info: ProviderInfo = {
url: "https://www.mailgun.com/",
docs: "https://documentation.mailgun.com/",
icon: "https://mailgun.com/favicon.ico",
Expand Down
6 changes: 3 additions & 3 deletions typespec/tools/remote_browser.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,13 @@ model RemoteBrowserIntegrationDef extends BaseIntegrationDef {
model RemoteBrowserProviderCard extends BaseProviderCard {
provider: "remote_browser" = "remote_browser";
setup: RemoteBrowserSetup;
methods: ProviderMethod<RemoteBrowserArguments, RemoteBrowserOutput>[] = #[
#{
methods: ProviderMethod<RemoteBrowserArguments, RemoteBrowserOutput>[] = [
{
method: "perform_action",
description: "Perform an action in the remote browser",
}
];
info: ProviderInfo = #{
info: ProviderInfo = {
url: "https://playwright.dev/",
docs: "https://playwright.dev/docs/api/class-page",
icon: "https://playwright.dev/favicon.ico",
Expand Down
6 changes: 3 additions & 3 deletions typespec/tools/spider.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ model SpiderIntegrationDef extends BaseIntegrationDef {
model SpiderProviderCard extends BaseProviderCard {
provider: "spider" = "spider";
setup: SpiderSetup;
methods: ProviderMethod<SpiderFetchArguments, SpiderFetchOutput>[] = #[
#{
methods: ProviderMethod<SpiderFetchArguments, SpiderFetchOutput>[] = [
{
method: "crawl",
description: "Crawl a website and extract data",
}
];
info: ProviderInfo = #{
info: ProviderInfo = {
url: "https://spider.com/",
docs: "https://spider.com/docs/",
icon: "https://spider.com/favicon.ico",
Expand Down
6 changes: 3 additions & 3 deletions typespec/tools/unstructured.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ model UnstructuredIntegrationDef extends BaseIntegrationDef {
model UnstructuredProviderCard extends BaseProviderCard {
provider: "unstructured" = "unstructured";
setup: UnstructuredSetup;
methods: ProviderMethod<UnstructuredPartitionArguments, UnstructuredPartitionOutput>[] = #[
#{
methods: ProviderMethod<UnstructuredPartitionArguments, UnstructuredPartitionOutput>[] = [
{
method: "partition",
description: "Partition documents into structured elements",
}
];
info: ProviderInfo = #{
info: ProviderInfo = {
url: "https://unstructured.io/",
docs: "https://docs.unstructured.io/",
icon: "https://unstructured.io/favicon.ico",
Expand Down
6 changes: 3 additions & 3 deletions typespec/tools/weather.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ model WeatherIntegrationDef extends BaseIntegrationDef {
model WeatherProviderCard extends BaseProviderCard {
provider: "weather" = "weather";
setup: WeatherSetup;
methods: ProviderMethod<WeatherGetArguments, WeatherGetOutput>[] = #[
#{
methods: ProviderMethod<WeatherGetArguments, WeatherGetOutput>[] = [
{
method: "get",
description: "Get the current weather for a city",
}
];
info: ProviderInfo = #{
info: ProviderInfo = {
url: "https://www.weatherapi.com/",
docs: "https://www.weatherapi.com/docs/",
icon: "https://www.weatherapi.com/favicon.ico",
Expand Down
Loading
Loading