500 error calling gpt-3.5turbo api

Hi.My code originally worked well, and I haven’t modified the partial code for apicall, but I keep getting 500 errors this morning. Can you check if it’s a server problem or mine? My code is as follows. I didn’t change anything from the code worked well few days ago.

def load_model():
    openai_api_key = {My api key that worked well}
    return ChatOpenAI(model_name="gpt-3.5-turbo", openai_api_key=openai_api_key, streaming=True)

llm = load_model()
memory_key = "history"

from langchain.agents.openai_functions_agent.agent_token_buffer_memory import (
    AgentTokenBufferMemory,
)

memory = AgentTokenBufferMemory(memory_key=memory_key, llm=llm)

from langchain.agents.openai_functions_agent.base import OpenAIFunctionsAgent
from langchain.schema.messages import SystemMessage
from langchain.prompts import MessagesPlaceholder


prompt = OpenAIFunctionsAgent.create_prompt(
    system_message=system_message,
    extra_prompt_messages=[MessagesPlaceholder(variable_name=memory_key)],
)

agent = OpenAIFunctionsAgent(llm=llm, tools=tools, prompt=prompt)

from langchain.agents import AgentExecutor

agent_executor = AgentExecutor(
    agent=agent,
    tools=tools, 
    memory=memory,
    verbose=True,
    return_intermediate_steps=True,
)
1 Like

It is broken now

2 Likes

The same for us on gpt-4-1106-preview. We started getting 500 errors about 8 hours ago, before that a few weeks nothing like this.

I guess this issue is caused by the 1st april’s rollout of the access to chatgpt for everyone. It’s a bad joke… I hope they solve it soon.

It actually works though. It seems like a lot of effort for a April fools joke.

1 Like