Skip to content

Add AIML API provider-specific example scripts#1243

Merged
zzstoatzz merged 1 commit into
PrefectHQ:mainfrom
D1m7asis:aimlapi-examples
Nov 7, 2025
Merged

Add AIML API provider-specific example scripts#1243
zzstoatzz merged 1 commit into
PrefectHQ:mainfrom
D1m7asis:aimlapi-examples

Conversation

@D1m7asis

@D1m7asis D1m7asis commented Nov 6, 2025

Copy link
Copy Markdown
Contributor

Added three example scripts under examples/provider_specific/aimlapi: run_agent.py demonstrates agent execution and file writing, structured_output.py shows structured JSON output for developer resources, and tools_agent.py illustrates tool-using agents for event planning.

From pr #1217 and issue #1171

Added three example scripts under examples/provider_specific/aimlapi: run_agent.py demonstrates agent execution and file writing, structured_output.py shows structured JSON output for developer resources, and tools_agent.py illustrates tool-using agents for event planning. Updated .gitignore to exclude .idea directory.
Copilot AI review requested due to automatic review settings November 6, 2025 15:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds three new example files demonstrating how to use the AI/ML API provider with Marvin. The examples showcase basic agent usage, structured output generation, and agents with custom tools.

  • Added helper function get_provider() for AI/ML API authentication and configuration
  • Implemented three example scripts showing different AI/ML API use cases: basic agent, structured output, and tools integration
  • Maintained consistency with existing provider-specific examples

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
examples/provider_specific/aimlapi/run_agent.py Demonstrates basic agent usage with file writing tool
examples/provider_specific/aimlapi/structured_output.py Shows structured output generation with TypedDict
examples/provider_specific/aimlapi/tools_agent.py Illustrates agent with multiple custom tools for date and weather

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

)

for resource in resources:
print(f"- {resource['title']}\n {resource['url']}\n {resource['summary']}\n")

Copilot AI Nov 6, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The nested f-string with multiple escape sequences reduces readability. Consider using a multi-line formatted string or separate print statements for cleaner code, e.g., print(f\"- {resource['title']}\"), print(f\" {resource['url']}\"), print(f\" {resource['summary']}\n\").

Suggested change
print(f"- {resource['title']}\n {resource['url']}\n {resource['summary']}\n")
print(f"- {resource['title']}")
print(f" {resource['url']}")
print(f" {resource['summary']}\n")

Copilot uses AI. Check for mistakes.
@D1m7asis

D1m7asis commented Nov 7, 2025

Copy link
Copy Markdown
Contributor Author

@zzstoatzz Hi team!

I’ve just added a provider-specific example set for AI/ML API , covering agent execution, structured outputs, and tool-using agents.

We’d like to stay in sync with the Marvin team for future updates and testing.
Could you please share an invite link (or contact) for the PrefectHQ / Marvin Slack or any internal dev channel where provider maintainers can coordinate? Thanks!

@PrefectHQ PrefectHQ deleted a comment from Copilot AI Nov 7, 2025

@zzstoatzz zzstoatzz left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great thanks!

@zzstoatzz

Copy link
Copy Markdown
Collaborator

Could you please share an invite link (or contact) for the PrefectHQ / Marvin Slack or any internal dev channel where provider maintainers can coordinate? Thanks!

feel free to join our slack (active) or discord (not so active)

@zzstoatzz zzstoatzz merged commit ba245ff into PrefectHQ:main Nov 7, 2025
7 of 8 checks passed
@zzstoatzz zzstoatzz mentioned this pull request Nov 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants