-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Implement summarize_story
for web
#64
Conversation
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.
If you can, please make the two small requested changes, otherwise I'll make them in a follow up PR.
// signal somewhere that this interaction is being processed. | ||
const submitResponse = (task: { id: string }) => { | ||
const text = inputRef.current.value.trim(); | ||
// TODO: implement after we have the backend endpoint |
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.
can you uncomment and implement the mutation code here (mostly copied from website/src/pages/grading/grade-output.tsx
) with a new field in the trigger body (that i'll make work in a following PR): update_type: "text_reply_to_post"
I can make this work pretty quick.
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.
@fozziethebeat gladly, quick question: post
in the sense of HTTP POST, or post as in reddit post?
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.
post in text_reply_to_post
refers to a row in the database in the post table. The post table allows to store conversation trees (threads or completions of different users or model sampling runs). The interactions like ratings and rankings are store in a separate table called post_reaction (currently users can only submit a single reaction to a given post).
@@ -0,0 +1,107 @@ | |||
import { Textarea } from "@chakra-ui/react"; |
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.
Can you add a comment at the top here:
// TODO(#65): Unify and simplify the task paths.
Merry X-Mas! :-) The endpoint to submit user generated summaries is the POST |
@andreaskoepf thank you, I think we already have a backend that calls the right api: Open-Assistant/website/src/pages/api/update_task.ts Lines 42 to 59 in 54c7a94
This was a bit unclear for me at the beginning with 2 backends, it is still unclear to me why it has to be like this, but for an MVP its ok. |
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.
thank you very much :)
just briefly regarding the "two backends". The real backend is the fastapi backend. The nextjs project is technically considered a "frontend" (even though it consists of its own back- and frontend). Other frontends exist, such as the discord bot. Frontends are responsible for making the user interaction happen and then sending all information to the backend.
The architecture is like this so we don't have to re-implement a lot of logic in all the place, like the bot, the website, etc.
There's a small change in the trigger body that I'll make in a follow up PR. |
Partially closes #28
There is no corresponding endpoint for submission the backend, so the submission is left unimplemented.
Merry Christmas 🎄