Skip to content

Commit

Permalink
fix(typespec,agents-api): Rename integration providers
Browse files Browse the repository at this point in the history
Signed-off-by: Diwank Singh Tomer <[email protected]>
  • Loading branch information
creatorrr committed Sep 25, 2024
1 parent d8072a0 commit d62a98e
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 19 deletions.
18 changes: 6 additions & 12 deletions agents-api/agents_api/autogen/Tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,11 @@ class IntegrationDef(BaseModel):
)
provider: Literal[
"dummy",
"dall-e",
"duckduckgo",
"hackernews",
"dalle_image_generator",
"duckduckgo_search",
"hacker_news",
"weather",
"wikipedia",
"twitter",
"webpage",
"requests",
]
"""
The provider of the integration
Expand Down Expand Up @@ -132,14 +129,11 @@ class IntegrationDefUpdate(BaseModel):
provider: (
Literal[
"dummy",
"dall-e",
"duckduckgo",
"hackernews",
"dalle_image_generator",
"duckduckgo_search",
"hacker_news",
"weather",
"wikipedia",
"twitter",
"webpage",
"requests",
]
| None
) = None
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#/usr/bin/env python3
# /usr/bin/env python3

MIGRATION_ID = "add_forward_tool_calls_option"
CREATED_AT = 1727235852.744035
Expand Down
44 changes: 44 additions & 0 deletions agents-api/tests/sample_tasks/integration_example.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Simple multi step task

input_schema:
type: object
properties:
topics:
type: array
items:
type: string

tools:
- type: function
function:
name: generate_questions
description: Generate a list of questions for a given topic
parameters:
type: object
properties:
topic:
type: string
description: The topic to generate questions for

- type: integration
name: duckduckgo_search
integration:
provider: duckduckgo
setup:
api_key: <something>
arguments:
language: en-US

main:
- foreach:
in: _["topics"]
do:
prompt:
- role: system
content: |-
Generate a list of 10 questions for the topic {{_}} as valid yaml.
unwrap: true

- tool: duckduckgo_search
arguments:
query: "'\n'.join(_)"
12 changes: 6 additions & 6 deletions typespec/common/scalars.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ scalar JinjaTemplate extends string;
/** Integration provider name */
alias integrationProvider = (
| "dummy"
| "dall-e"
| "duckduckgo"
| "hackernews"
| "dalle_image_generator"
| "duckduckgo_search"
| "hacker_news"
| "weather"
| "wikipedia"
| "twitter"
| "webpage"
| "requests"
// | "twitter"
// | "webpage"
// | "requests"
);

0 comments on commit d62a98e

Please sign in to comment.