pteichman / cobe

A Markov chain based text generation library and MegaHAL style chatbot
http://teichman.org/blog/
MIT License
239 stars 51 forks source link

Constant reply time #32

Open CrazyPython opened 7 years ago

CrazyPython commented 7 years ago

I'm creating a bot and

...as many candidate replies as it can in half a second.

is inconvenient, because my bot has it's own scoring algorithm wrapping cobe. Can you add a method that uses constant reply CPU?

pteichman commented 7 years ago

You can pass loop_ms=0 to reply() to get a single candidate. With the current code, that reply will be run through cobe's scorer, but it's a lot closer to what you want.

CrazyPython commented 7 years ago

@pteichman I would like to be able to use cobe's scorer so that there are a constant number of iterations.

pteichman commented 7 years ago

Ah, ok. There isn't a way to do that with the current API, but it wouldn't be difficult to add.