Skip to content

Conversation

Copy link

Copilot AI commented Feb 8, 2026

Key classes like ChatAgent and ModelFactory were only importable from submodules, reducing discoverability for programmatic consumers. Additionally, camel.prompts.__all__ contained a non-existent name that caused ImportError at import time.

  • camel/__init__.py: Re-export the 10 most-used classes (ChatAgent, ModelFactory, BaseMessage, ModelType, ModelPlatformType, FunctionTool, BaseToolkit, RolePlaying, Workforce, ChatAgentResponse) — aligned with the quickstart guide and 200+ examples
  • camel/prompts/__init__.py: Remove phantom DescriptionVideoPromptTemplateDict from __all__ (only VideoDescriptionPromptTemplateDict exists)
  • test/test_all_exports.py: Add parametrized test validating every __all__ entry resolves across 13 submodules to prevent regressions
# Before: required knowing submodule paths
from camel.agents import ChatAgent
from camel.models import ModelFactory
from camel.types import ModelPlatformType, ModelType

# After: also available from root
from camel import ChatAgent, ModelFactory, ModelPlatformType, ModelType

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

… add export validation tests

Co-authored-by: lightaime <[email protected]>
Copilot AI changed the title [WIP] Refactor repository structure for better code quality Expose core public API from root package and fix broken prompt export Feb 8, 2026
Copilot AI requested a review from lightaime February 8, 2026 08:03
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.

2 participants