Simatwa / python-tgpt

AI Chat in Terminal + Package + REST-API
https://python-tgpt.onrender.com
MIT License
102 stars 15 forks source link

AttributeError: module 'signal' has no attribute 'SIGALRM'. Did you mean: 'SIGABRT'? #10

Closed johnd0e closed 7 months ago

johnd0e commented 7 months ago

Windows Command line without prompt

Simatwa commented 7 months ago

Exact commands?

johnd0e commented 7 months ago

e.g.

pytgpt generate -s
Simatwa commented 7 months ago

I hope everything good now?

johnd0e commented 7 months ago

I hope everything good now?

Well, taking prompt from stdin would be very useful for Windows too..

Simatwa commented 7 months ago

The approach implemented seems to be limited to *nix systems. If there will be one for Windows; shall be implemented as well. Until then, let's utilize the available workarounds.

johnd0e commented 7 months ago

The approach implemented seems to be limited to *nix systems.

Besides of signals usage, it is pretty the same. And then instead of relying on TimeoutError we can use sys.stdin.isatty().

Simatwa commented 7 months ago

Submit that PR folk.