Skip to content

Commit

Permalink
[RFC] Add "function" as an explicit kind of output data
Browse files Browse the repository at this point in the history
This can help us distinguish function calling from regular strings quickly -- since function calling is now supported across multiple models, it deserves to be a top-level output kind in the schema.

For example, current models that support it:
* GPT-3.5, GPT-4, GPT-4V
* Gemini
* [Mixtral (using Anyscale endpoints)](https://docs.endpoints.anyscale.com/guides/function-calling/#:~:text=With%20Anyscale%20Endpoints%2C%20you%20can,parameters%20to%20pass%20to%20it.)
* There will be more to come
  • Loading branch information
saqadri committed Dec 27, 2023
1 parent c83ca37 commit 6259553
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion python/src/aiconfig/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class OutputData(BaseModel):
OutputData represents the output content in a standard format.
"""

kind: Literal["string", "file_uri", "base64"]
kind: Literal["string", "file_uri", "base64", "function"]
value: str


Expand Down
2 changes: 1 addition & 1 deletion typescript/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ export type ExecuteResult = {
data:
| JSONValue
| {
kind: "string" | "file_uri" | "base64";
kind: "string" | "file_uri" | "base64" | "function";
value: string;
};
/**
Expand Down

0 comments on commit 6259553

Please sign in to comment.