Skip to content
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

Fixes for breaking changes in #182 #188

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion website/src/pages/api/new_task/[task_type].ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const handler = async (req, res) => {
"Content-Type": "application/json",
},
body: JSON.stringify({
post_id: registeredTask.id,
message_id: registeredTask.id,
}),
});
const ack = await ackRes.json();
Expand Down
6 changes: 3 additions & 3 deletions website/src/pages/api/update_task.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ const handler = async (req, res) => {
"Content-Type": "application/json",
},
body: JSON.stringify({
type: "post_rating",
type: "message_rating",
user: {
id: token.sub,
display_name: token.name || token.email,
auth_method: "local",
},
post_id: id,
user_post_id: interaction.id,
message_id: id,
user_message_id: interaction.id,
...content,
}),
});
Expand Down
2 changes: 1 addition & 1 deletion website/src/pages/create/assistant_reply.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const AssistantReply = () => {
const text = inputRef.current.value.trim();
trigger({
id: task.id,
update_type: "text_reply_to_post",
update_type: "text_reply_to_message",
content: {
text,
},
Expand Down
2 changes: 1 addition & 1 deletion website/src/pages/create/summarize_story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const SummarizeStory = () => {
const text = inputRef.current.value.trim();
trigger({
id: task.id,
update_type: "text_reply_to_post",
update_type: "text_reply_to_message",
content: {
text,
},
Expand Down
4 changes: 2 additions & 2 deletions website/src/pages/create/user_reply.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const UserReply = () => {

const inputRef = useRef<HTMLTextAreaElement>(null);

const { isLoading } = useSWRImmutable("/api/new_task/user_reply", fetcher, {
const { isLoading } = useSWRImmutable("/api/new_task/prompter_reply", fetcher, {
onSuccess: (data) => {
console.log(data);
setTasks([data]);
Expand All @@ -36,7 +36,7 @@ const UserReply = () => {
const text = inputRef.current.value.trim();
trigger({
id: task.id,
update_type: "text_reply_to_post",
update_type: "text_reply_to_message",
content: {
text,
},
Expand Down
2 changes: 1 addition & 1 deletion website/src/pages/evaluate/rank_assistant_replies.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const RankAssistantReplies = () => {
const submitResponse = (task) => {
trigger({
id: task.id,
update_type: "post_ranking",
update_type: "message_ranking",
content: {
ranking,
},
Expand Down
2 changes: 1 addition & 1 deletion website/src/pages/evaluate/rank_initial_prompts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const RankInitialPrompts = () => {
const submitResponse = (task) => {
trigger({
id: task.id,
update_type: "post_ranking",
update_type: "message_ranking",
content: {
ranking,
},
Expand Down
4 changes: 2 additions & 2 deletions website/src/pages/evaluate/rank_user_replies.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const RankUserReplies = () => {
*/
const [ranking, setRanking] = useState<number[]>([]);

const { isLoading } = useSWRImmutable("/api/new_task/rank_user_replies", fetcher, {
const { isLoading } = useSWRImmutable("/api/new_task/rank_prompter_replies", fetcher, {
onSuccess: (data) => {
setTasks([data]);
},
Expand All @@ -37,7 +37,7 @@ const RankUserReplies = () => {
const submitResponse = (task) => {
trigger({
id: task.id,
update_type: "post_ranking",
update_type: "message_ranking",
content: {
ranking,
},
Expand Down