mrwadams / stride-gpt

An AI-powered threat modeling tool that leverages OpenAI's GPT models to generate threat models for a given application based on the STRIDE methodology.
https://stridegpt.streamlit.app
MIT License
335 stars 100 forks source link

Warning: This way of initializing it is no longer supported #6

Closed ffaggiani closed 7 months ago

ffaggiani commented 7 months ago

Hey, do you think the code needs an update? Looking into logs i see the following warnings:

2023-11-21 15:37:46.540 Session with id c47b6f13-4f5b-49b4-a2f5-9c6b33d2c165 is already connected! Connecting to a new session.
/usr/local/lib/python3.8/dist-packages/langchain/llms/openai.py:243: UserWarning: You are trying to use a chat model. This way of initializing it is no longer supported. Instead, please use: `from langchain.chat_models import ChatOpenAI`
  warnings.warn(
/usr/local/lib/python3.8/dist-packages/langchain/llms/openai.py:1038: UserWarning: You are trying to use a chat model. This way of initializing it is no longer supported. Instead, please use: `from langchain.chat_models import ChatOpenAI`

I found some info related here

Regards, Fab

mrwadams commented 7 months ago

Hi Fab,

Good timing! I've just pushed an update that extensively re-writes the app and removes LangChain in favour of directly calling the OpenAI API to take advantage of JSON Mode and other features recently introduced by OpenAI.

I'll be updating the README file in the next day or so to provide more details.

Thanks,

Matt