-
Notifications
You must be signed in to change notification settings - Fork 41
DEV: improve tool infra, improve forum researcher prompts, improve logging #1391
Conversation
(useful for when we are polling)
|
|
||
| results = [] | ||
|
|
||
| formatter.each_chunk { |chunk| results << run_inference(chunk[:text], goals, post, &blk) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should you also do a break if context.cancel_manager&.cancelled? here in each_chunk?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it breaks early enough in run inf not to matter.
|
|
||
| @http_requests_made = 0 | ||
| @sleep_calls_made = 0 | ||
| @http_requests_made = 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dup of line 34 above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice catch
| bot = DiscourseAi::Personas::Bot.as(bot_user, persona: persona.new) | ||
|
|
||
| DiscourseAi::AiBot::Playground.new(bot).reply_to(post) | ||
| DiscourseAi::AiBot::Playground.new(bot).reply_to(post, feature_name: "bot") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to pass this from the job caller?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmmm maybe ... this job though is dedicated to bot.
Uh oh!
There was an error while loading. Please reload this page.