Python ModelFarm - Internal server error

This code errors:

from import ChatModel, ChatSession, ChatMessage, ChatModelResponse

chatSessions = {}
chatModel: ChatModel = ChatModel('chat-bison')

def newChatSession(UserData: dict):
  nChatSession: ChatSession = ChatSession(
    context=f"You are an AI chatbot that speaks with {UserData['DisplayName']} (@{UserData['UserName']} on YouTube), You need to make sure you follow YouTube's terms of service and not speak about anything that breaks it. But basically, You are a normal AI chatbot.",
  chatSessions[UserData['UserID']] = nChatSession

def chat(message: str, UserData: dict):
  nChatMsg = ChatMessage(
    author=f"{UserData['DisplayName']} (@{UserData['UserName']})",
  response =[chatSessions[UserData['UserID']]], max_output_tokens=50)
  return response

exampleUserData = {
    "DisplayName": "Matan",
    "UserName": "abdfuhfhfffv123",
    "UserID": 923
while True:
  askMessage = input("What are you going to ask me? ")
  response = chat(askMessage, exampleUserData)


Traceback (most recent call last):
  File "", line 30, in <module>
    response = chat(askMessage, exampleUserData)
  File "", line 20, in chat
    response =[chatSessions[UserData['UserID']]], max_output_tokens=50)
  File "/home/runner/Untitled-AI-Project/venv/lib/python3.10/site-packages/replit/ai/modelfarm/", line 53, in chat
  File "/home/runner/Untitled-AI-Project/venv/lib/python3.10/site-packages/replit/ai/modelfarm/", line 57, in _check_response
    raise InvalidResponseException(rjson["detail"])

Library: replit-ai (Replit Docs)

There should be one more error line after this, could you check and see if you have another line please?

Oh yeah, Its this one: Internal server error

Seems like the server might have just had some issues, do you get the same error now?

It looks like it only errors on the second question

You’re not the first person to be experiencing this:

and I have no idea how to fix