Coder Social home page Coder Social logo

[muvtuberdriver] DeadlineExceeded about muvtuber HOT 3 OPEN

cdfmlr avatar cdfmlr commented on July 28, 2024
[muvtuberdriver] DeadlineExceeded

from muvtuber.

Comments (3)

cdfmlr avatar cdfmlr commented on July 28, 2024

There is a timeout for the ChatGPT call. Defined at muvtuberdriver/chatbot/grpccli.go#L22-L46:

const DefaultRPCTimeout = time.Second * 60

// Client is a gRPC client for the ChatbotService
type Client struct {
	conn   *grpc.ClientConn
	client chatbotv2.ChatbotServiceClient

	RPCTimeout time.Duration

	pool.Poolable
}

// NewClient creates a new Client
func NewClient(addr string) (*Client, error) {
	conn, err := grpc.Dial(addr, grpc.WithTransportCredentials(insecure.NewCredentials()))
	if err != nil {
		return nil, err
	}
	return &Client{
		conn:       conn,
		client:     chatbotv2.NewChatbotServiceClient(conn),
		RPCTimeout: DefaultRPCTimeout,
	}, nil
}

The default value is 1 minute. It should be enough in my practices.

Are you trying to generate very long sentences or suffering from a bad network connection? I suggest editing the InitialPrompt config to prompt ChatGPT to say short sentences. This may be helpful.

from muvtuber.

nicolapanegos avatar nicolapanegos commented on July 28, 2024

Are you trying to generate very long sentences or suffering from a bad network connection? I suggest editing the InitialPrompt config to prompt ChatGPT to say short sentences. This may be helpful.

I dont think it that problem
maybe there is some problem with openai service? becouse i have this problem only in these days..
I also put all code in new VM on my proxmox (no firewall) server and still same

more detailed logs of compose

muvtuber-muvtuberdriver-1     | 2023/06/26 16:37:38 INFO [TextInFromHTTP] recv TextIn from HTTP. author=user priority=2 content="test"
muvtuber-muvtuberdriver-1     | 2023/06/26 16:37:38 INFO [PriorityReduceFilter] outputMaxPriorityOne boost Priority -> Highest author=user content="test" priority=2
muvtuber-muvtuberdriver-1     | 2023/06/26 16:37:38 INFO [PrioritizedChatbot] Chat(user): "test"
muvtuber-muvtuberdriver-1     | 2023/06/26 16:37:38 INFO [chatbot] SessionClient Chat: got textIn: chatbotName=ChatGPTChatbot textin=test
muvtuber-muvtuberdriver-1     | 2023/06/26 16:37:38 INFO [chatbot] SessionClient Chat: NewClient created. chatbot=ChatGPTChatbot addr=chatgpt_chatbot:50052
muvtuber-chatgpt_chatbot-1    | WARNING:root:ChatGPTProxy._new_chatgpt failed to get initial_response: 'ChatGPTv3' object has no attribute 'initial_response'
muvtuber-chatgpt_chatbot-1    | INFO:root:ChatGPTgRPCServer.NewSession: (OK) session_id=ad59e49a-7284-43e5-948f-3ae305f063fe
muvtuber-muvtuberdriver-1     | 2023/06/26 16:37:39 INFO [chatbot] SessionClient Chat: NewSession created. chatbot=ChatGPTChatbot addr=chatgpt_chatbot:50052 sessionID=ad59e49a-7284-43e5-948f-3ae305f063fe
muvtuber-muvtuberdriver-1     | 2023/06/26 16:37:54 WARN [chatbot] ChatGPTChatbot Chat() failed. The SessionClient will be released if successive failures: serAddr=chatgpt_chatbot:50052 failures=1/3 err=Chat(addr=chatgpt_chatbot:50052) failed: rpc error: code = DeadlineExceeded desc = Deadline Exceeded
muvtuber-muvtuberdriver-1     | 2023/06/26 16:37:54 ERROR [PrioritizedChatbot] all Chatbots failed: Chat() failed. The SessionClient will be released if successive failures: serAddr=chatgpt_chatbot:50052 failures=1/3 err=Chat(addr=chatgpt_chatbot:50052) failed: rpc error: code = DeadlineExceeded desc = Deadline Exceeded, return nil
muvtuber-muvtuberdriver-1     | 2023/06/26 16:37:54 ERROR chatbot.Chat(&{user test 2}) failed: Chat() failed. The SessionClient will be released if successive failures: serAddr=chatgpt_chatbot:50052 failures=1/3 err=Chat(addr=chatgpt_chatbot:50052) failed: rpc error: code = DeadlineExceeded desc = Deadline Exceeded
muvtuber-chatgpt_chatbot-1    | WARNING:root:ChatGPT ask error: 502 Bad Gateway {"error":{"code":502,"message":"Bad gateway.","param":null,"type":"cf_bad_gateway"}}
muvtuber-chatgpt_chatbot-1    | WARNING:root:ChatGPTgRPCServer.Chat: (StatusCode.UNAVAILABLE) b'502 Bad Gateway {"error":{"code":502,"message":"Bad gateway.","param":null,"type":"cf_bad_gateway"}}'

after long time

muvtuber-chatgpt_chatbot-1    | INFO:root:ChatGPTgRPCServer.Chat: (OK) test pass 

chatgpt_chatbot logs

INFO:root:gRPC reflection enabled.
WARNING:root:ChatGPTProxy._new_chatgpt failed to get initial_response: 'ChatGPTv3' object has no attribute 'initial_response'
INFO:root:ChatGPTgRPCServer.NewSession: (OK) session_id=a97178d4-d489-4ca0-9b40-98925f9e9c7d
INFO:root:ChatGPTgRPCServer.Chat: (OK) test pass

in this case I didnt change nothing on the original code, all the port are setted by default (using docker compose) 🤔
some time run perfecty some times not (like 3 message passed of 10), thats so strange

from muvtuber.

cdfmlr avatar cdfmlr commented on July 28, 2024

Sorry for my delayed response. As you mentioned that this may be a temporary issue to blame OpenAI. And there were days pass, I am wondering if the problem's still existing.

from muvtuber.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.