So what parameters OpenAI class expects
i am getting errors in my code any one suggest the best solution
import streamlit as st
from llama_index.core import SimpleDirectoryReader
from llama_index.core import ServiceContext
from llama_index.llms import openai
from llama_index.core import VectorStoreIndex
from llama_index.core import chat_engine
from openai import OpenAI
from dotenv import load_dotenv
import openai
import os
load_dotenv()
openai.api_key=os.getenv("OPENAI_API_KEY")
with st.sidebar:
st.title("Chatbot using LLM")
st.markdown('''
## About
This app is build LLM-powered Chatbot using:\n
- Streamlit
- Llama Index
- Openai (LLM Model)
''')
st.header("Chatbot in Llama Index by Irsa Ilyas")
def main():
reader=SimpleDirectoryReader(input_dir='./data', recursive=True)
docs=reader.load_data()
service_context=ServiceContext.from_defaults(llm=OpenAI(model="gpt-3.5-turbo-1106",temperature=0.5,system_prompt="you are machine learning engineer and you are here answer technical questions"))
index=VectorStoreIndex.from_documents(docs,service_context=service_context)
query=st.text_input("Ask questions related to your data")
if query:
chat_index=index.as_chat_engine(chat_mode="condense_question", verbose=True)
response=chat_engine.chat(query)
st.write(response.response)
if __name__=='__main__':
main()