Sometimes its responding fast but its taking 10-20 seconds to respond in the middle of the conversations, Please if anyone addressed this issue, Tell me the fix 🥲🥲🥲
Code :-
import os
import logging
from salesgpt.agents import SalesGPT
from langchain_community.chat_models import ChatLiteLLM
from dotenv import load_dotenv
Suppress logging output
logging.getLogger().setLevel(logging.ERROR)
load_dotenv()
OPENAI_API_KEY = os.getenv("OPENAI_API_KEY")
llm = ChatLiteLLM(temperature=0.4)
sales_agent = SalesGPT.from_llm(llm, use_tools=False, verbose=False,
product_catalog=None,
salesperson_name="Ted Lasso",
salesperson_role="Sales Representative",
company_name="Sleep Haven",
company_business='''Sleep Haven
is a premium mattress company that provides
customers with the most comfortable and
supportive sleeping experience possible.
We offer a range of high-quality mattresses,
pillows, and bedding accessories
that are designed to meet the unique
needs of our customers.'''
)
while True:
sales_agent.step()
user_input = input('Your response: ')
if user_input.lower() == 'exit':
break
sales_agent.human_step(user_input)
It could be due to an OpenAI server outage, especially if you were testing and running it today/yesterday using their models. You can check for issues with ChatGPT through the OpenAI Status.
Sometimes its responding fast but its taking 10-20 seconds to respond in the middle of the conversations, Please if anyone addressed this issue, Tell me the fix 🥲🥲🥲
Code :-
import os import logging from salesgpt.agents import SalesGPT from langchain_community.chat_models import ChatLiteLLM from dotenv import load_dotenv
Suppress logging output
logging.getLogger().setLevel(logging.ERROR)
load_dotenv()
OPENAI_API_KEY = os.getenv("OPENAI_API_KEY")
llm = ChatLiteLLM(temperature=0.4)
sales_agent = SalesGPT.from_llm(llm, use_tools=False, verbose=False, product_catalog=None, salesperson_name="Ted Lasso", salesperson_role="Sales Representative", company_name="Sleep Haven", company_business='''Sleep Haven is a premium mattress company that provides customers with the most comfortable and supportive sleeping experience possible. We offer a range of high-quality mattresses, pillows, and bedding accessories that are designed to meet the unique needs of our customers.''' )
while True: sales_agent.step() user_input = input('Your response: ') if user_input.lower() == 'exit': break sales_agent.human_step(user_input)
sales_agent.determine_conversation_stage()
print("Conversation ended.")