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

Its so slow #106

Open
Dixith-dev opened this issue Feb 14, 2024 · 1 comment
Open

Its so slow #106

Dixith-dev opened this issue Feb 14, 2024 · 1 comment

Comments

@Dixith-dev
Copy link

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.")

@iljamak
Copy link
Collaborator

iljamak commented Feb 15, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants