-
Notifications
You must be signed in to change notification settings - Fork 126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[EA Forum only] updates to the criticism tips bot, temporarily pause showing the card to users #9765
Conversation
| @@ -162,7 +162,7 @@ export const getPostMarketInfo = async (post: DbPost, context: ResolverContext): | |||
| void refreshMarketInfoInCache(post, context); | |||
| } | |||
|
|
|||
| return { probability: cacheItem.probability, isResolved: cacheItem.isResolved, year: cacheItem.year, url: cacheItem.url }; | |||
| return { probability: cacheItem.probability, isResolved: cacheItem.isResolved, year: cacheItem.year, url: cacheItem.url ?? '' }; | |||
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 noticed an error here so I added this to fix it
| @@ -133,24 +131,17 @@ function preprocessHtml(html: string): string { | |||
| return $.html(); | |||
| } | |||
|
|
|||
| export async function postToPrompt({template, post, promptSuffix, postBodyCache, markdownBody}: { | |||
| export async function postToPrompt({template, post, promptSuffix, postBodyCache}: { | |||
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 previously made some changes to this function to work with the PostIsCriticismRequest, this basically undoes that
| */ | ||
| export async function postIsCriticism(post: PostIsCriticismRequest, currentUserId?: string): Promise<boolean> { | ||
| // Only run this on the EA Forum on production, since it costs money. | ||
| if (!isEAForum || !isProduction) return false |
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.
Feel free to test this by removing the !isProduction condition - now that it's not using a fine-tuned model this will actually work with dev credentials :)
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! LGTM!
| import { addField, dropField } from "./meta/utils" | ||
|
|
||
| export const up = async ({db}: MigrationContext) => { | ||
| await addField(db, Users, 'criticismTipsDismissed') |
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.
Shouldn't this migration also drop the field from the posts table?
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 originally included that, but then I changed it because I figured it was safer to do it in a separate migration after deploying this? I think that's what we've done previously
| top: -100, | ||
| height: '120%', | ||
| '@media (max-width: 1500px)': { | ||
| right: -335, | ||
| '@media (max-width: 1670px)': { |
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.
These breakpoints are used in a lot of places - maybe extract into a constant?
OpenAI is giving away free training tokens for fine-tuning GPT-4o, so I figured it's a good time to update the criticism tips bot. I decided to first test out just directly querying GPT-4o because that's less hassle than fine-tuning a new model, and it seemed to work great, so I did that instead.
So this PR has the following updates for the criticism tips bot:
┆Issue is synchronized with this Asana task by Unito