Skip to content

Commit

Permalink
Testing LlamaIndex test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
marklysze committed Nov 20, 2024
1 parent cb7e881 commit ae43789
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/contrib-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -253,10 +253,6 @@ jobs:
- name: Install packages and dependencies for WebSurfer
run: |
pip install -e .[websurfer]
- name: Upgrade NumPy for Python 3.13 support
run: |
pip install --upgrade "numpy>=2.1.0"
python -c "import numpy; print(f'NumPy version: {numpy.__version__}')"
- name: Set AUTOGEN_USE_DOCKER based on OS
shell: bash
run: |
Expand Down
9 changes: 9 additions & 0 deletions autogen/agentchat/contrib/llamaindex_conversable_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,15 @@
from llama_index.core.agent.runner.base import AgentRunner
from llama_index.core.base.llms.types import ChatMessage
from llama_index.core.chat_engine.types import AgentChatResponse
from pydantic import BaseModel

# Add Pydantic configuration to allow arbitrary types
# Added to mitigate PydanticSchemaGenerationError
class Config:
arbitrary_types_allowed = True

BaseModel.model_config = Config

except ImportError as e:
logger.fatal("Failed to import llama-index. Try running 'pip install llama-index'")
raise e
Expand Down

0 comments on commit ae43789

Please sign in to comment.