Skip to content

Conversation

devanshkaloti
Copy link

Error 1

---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
Cell In[2], line 1
----> 1 from llama_index.tools import FunctionTool
      2 from playwright.async_api import async_playwright
      3 from tarsier import Tarsier, GoogleVisionOCRService

ModuleNotFoundError: No module named 'llama_index.tools'

Changes:

  • Changed from llama_index.tools import FunctionTool to from llama_index.core.tools import FunctionTool

Error 2

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
Cell In[5], line 1
----> 1 from llama_index.agent import OpenAIAgent
      2 from llama_index.llms import OpenAI
      4 llm = OpenAI(model="gpt-4")

ImportError: cannot import name 'OpenAIAgent' from 'llama_index.agent' (unknown location)

Changes:

  • Changed OpenAI import statements

Error 3

Error: Locator.press_sequentially: selector: expected string, got object
  • element = page.locator(x_path) -> element = page.locator(x_path['xpath'])

Additional

  • Changed the default example model from gpt-4 to gpt-4o since it has much better performance and is cheaper.
  • These changes work with Python version 3.12.7.

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