Skip to content

Commit

Permalink
fix(typespec): Misc fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Diwank Tomer <[email protected]>
  • Loading branch information
Diwank Tomer committed Jul 22, 2024
1 parent b652995 commit 2406fe8
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 17 deletions.
4 changes: 2 additions & 2 deletions typespec/executions/models.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ model Transition {
execution_id: Execution.id;

@visibility("read")
outputs: Record<unknown>;
output: Record<unknown>;

@visibility("read")
current: TransitionTarget;
Expand All @@ -122,4 +122,4 @@ model Transition {

...HasId;
...HasTimestamps;
}
}
4 changes: 2 additions & 2 deletions typespec/sessions/models.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ model Session {

/** Threshold value for the adaptive context functionality */
token_budget: uint16 | null = null;

/** Action to start on context window overflow */
context_overflow: ContextOverflowType | null = null;

Expand Down Expand Up @@ -150,4 +150,4 @@ model CreateOrUpdateSessionRequest {
id: uuid;

...CreateSessionRequest;
}
}
10 changes: 5 additions & 5 deletions typespec/tasks/models.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -130,19 +130,19 @@ model Task {
name: string;

description: string = "";

/** The entrypoint of the task. */
main: WorkflowStep[];

/** The schema for the input to the task. `null` means all inputs are valid. */
input_schema: Record<unknown> | null = null;

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

/** Whether to inherit tools from the parent agent or not. Defaults to true. */
inherit_tools: boolean = true;

@visibility("read")
agent_id: Agent.id;

Expand Down Expand Up @@ -170,4 +170,4 @@ model CreateTaskRequest {
model CreateOrUpdateTaskRequest {
id: uuid;
...CreateTaskRequest;
}
}
14 changes: 6 additions & 8 deletions typespec/tools/models.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,21 @@ model FunctionDef {
/** DO NOT USE: This will be overriden by the tool name. Here only for compatibility reasons. */
name?: validPythonIdentifier = "overriden";

/** Description of the function */
description?: identifierSafeUnicode;

/** The parameters the function accepts */
parameters: FunctionParameters;

/** Description of the function */
description?: identifierSafeUnicode;
}

@discriminator("type")
model Tool {
/** Whether this tool is a `function`, `api_call`, `system` etc. (Only `function` tool supported right now) */
type: ToolType;

/** The tool should be run in the background (not supported at the moment) */
background: boolean = false;
/** Name of the tool (must be unique for this agent and a valid python identifier string )*/
name: validPythonIdentifier;

function?: FunctionDef;
integration?: unknown;
Expand Down Expand Up @@ -76,9 +77,6 @@ model NamedToolChoice {
/** Whether this tool is a `function`, `api_call`, `system` etc. (Only `function` tool supported right now) */
type: ToolType;

/** The name of the tool/function */
name: validPythonIdentifier;

function?: FunctionCallOption;
integration?: unknown;
system?: unknown;
Expand Down Expand Up @@ -133,4 +131,4 @@ model ChosenFunctionCall extends ChosenToolCall {

/** The function to call */
function: FunctionCallOption;
}
}

0 comments on commit 2406fe8

Please sign in to comment.