airtai / faststream-gen

The faststream-gen library uses advanced AI to generate FastStream code from user descriptions, speeding up FastStream app development.
https://faststream-gen.airt.ai
Apache License 2.0
43 stars 6 forks source link

do not work anymore #180

Open w-famy opened 8 months ago

w-famy commented 8 months ago

I just installed using pip install faststream-gen under python3.12 environement.

faststream_gen --help crash see bellow:

faststream_gen --help /home/bill/virtual/stream/lib/python3.12/site-packages/langchain/embeddings/init.py:29: LangChainDeprecationWarning: Importing embeddings from langchain is deprecated. Importing from langchain will no longer be supported as of langchain==0.2.0. Please import from langchain-community instead:

from langchain_community.embeddings import OpenAIEmbeddings.

To install langchain-community run pip install -U langchain-community. warnings.warn( /home/bill/virtual/stream/lib/python3.12/site-packages/langchain/vectorstores/init.py:35: LangChainDeprecationWarning: Importing vector stores from langchain is deprecated. Importing from langchain will no longer be supported as of langchain==0.2.0. Please import from langchain-community instead:

from langchain_community.vectorstores import FAISS.

To install langchain-community run pip install -U langchain-community. warnings.warn( Traceback (most recent call last): File "/home/bill/virtual/stream/bin/faststream_gen", line 5, in from faststream_gen.cli import app File "/home/bill/virtual/stream/lib/python3.12/site-packages/faststream_gen/cli.py", line 14, in from faststream_gen._code_generator.app_description_validator import ( File "/home/bill/virtual/stream/lib/python3.12/site-packages/faststream_gen/_code_generator/app_description_validator.py", line 13, in from .chat import CustomAIChat File "/home/bill/virtual/stream/lib/python3.12/site-packages/faststream_gen/_code_generator/chat.py", line 48, in openai.error.RateLimitError, ^^^^^^^^^^^^ AttributeError: module 'openai' has no attribute 'error'

I install pip install -U langchain-community too.

saadhypng commented 8 months ago

Hey @w-famy

Just run pip install openai==0.28, there is an issue with the latest version that is causing this issue.