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

@ai_flow breaks because of incorrect import of interactive_chat #858

Open
3 tasks done
max-clouatre opened this issue Feb 22, 2024 · 0 comments
Open
3 tasks done
Labels
bug Something isn't working

Comments

@max-clouatre
Copy link

max-clouatre commented Feb 22, 2024

First check

  • I added a descriptive title to this issue.
  • I used the GitHub search to try to find a similar issue and didn't find one.
  • I searched the Marvin documentation for this issue.

Bug summary

Looks like ai_flow has an old import for chat_ui.interactive_chat
image

If I update the import path, ai_flow works as expected

from marvin.beta.chat_ui import interactive_chat

There is no documentation for this work aside from an old tweet from @jlowin so no pressure, just noting!

Reproduction

from marvin.beta.ai_flow import ai_flow, ai_task

@ai_task
def get_first_name():
    """ Get the users first name"""

@ai_task
def write_poem(name:str):
    """ Write a short poem for the user"""

@ai_flow
def hello_world():
    name = get_first_name()
    write_poem(name)

if __name__ == "__main__":
    hello_world()

Error

Traceback (most recent call last):
  File "C:\src\MLab-AI-Extraction-Api\test.py", line 46, in <module>
    from marvin.beta.ai_flow import ai_flow, ai_task
  File "C:\src\MLab-AI-Extraction-Api\.venv\Lib\site-packages\marvin\beta\ai_flow\__init__.py", line 2, in <module>
    from .ai_flow import ai_flow
  File "C:\src\MLab-AI-Extraction-Api\.venv\Lib\site-packages\marvin\beta\ai_flow\ai_flow.py", line 10, in <module>
    from .chat_ui import interactive_chat
ModuleNotFoundError: No module named 'marvin.beta.ai_flow.chat_ui'

Versions

Version:                2.1.5
Python version:         3.11.2       
OS/Arch:                windows/amd64

Additional context

No response

@max-clouatre max-clouatre added the bug Something isn't working label Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant