Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set up tools structures #553

Merged
merged 6 commits into from
Jan 28, 2025
Merged

Set up tools structures #553

merged 6 commits into from
Jan 28, 2025

Conversation

ohdearquant
Copy link
Collaborator

@ohdearquant ohdearquant commented Jan 28, 2025

PR Description: Set Up Tools Structures & Minor Error Handling in iModel

This PR refactors and expands LionAGI to include initial placeholders for various tools (e.g. browser, code, file) under a consistent directory structure. It also includes a minor enhancement for handling missing api_key in iModel when requires_api_key=True, raising a clear ValueError if none is found.

Key Changes

  1. Tools Directory Structure

    • New lionagi/tools folder containing subfolders like browser, code, file, and their respective providers.
    • Each subfolder now has an __init__.py and placeholder modules (e.g. aider_.py, docling_.py) as initial scaffolding.
    • A base.py in tools that sets up a minimal foundation for tool classes.
  2. Minor iModel Error Handling

    • In iModel.__init__(), if api_key is not provided (and requires_api_key=True), the code now raises ValueError("API key must be provided").
    • This ensures the usage pattern is clearer for providers requiring an explicit API key.
  3. Version Bump

    • Bumps version from 0.9.2 to 0.9.3 in lionagi/version.py and pyproject.toml.
  4. Housekeeping

    • Adds file headers with SPDX license notes in newly introduced files.
    • Minor additions in utils or placeholder references for upcoming expansions (e.g., docling support in reader.py).

Rationale

  • Tools are part of the LionAGI architecture to handle specialized actions (e.g. browsing, coding, file I/O). This PR lays the initial foundation.
  • Improving iModel error messages around API keys prevents hidden misconfigurations and aligns with “fail fast” best practices.

Next Steps

  • Flesh out each provider inside tools/browser/providers and tools/code/providers, finalizing method-level logic.
  • Confirm synergy with the Action system for consistent function-calling from LLM prompts.
  • Test newly introduced scaffolding in real usage scenarios.

@ohdearquant ohdearquant merged commit 1d6303a into main Jan 28, 2025
5 checks passed
@ohdearquant ohdearquant deleted the set-up-tools-structures branch January 28, 2025 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant