Merge pull request #188 from k-nearest-neighbor/fixes_for_breaking_change_182

Fixes for breaking changes in #182
This commit is contained in:
Keith Stevens
2022-12-31 16:47:35 +09:00
committed by GitHub
8 changed files with 12 additions and 12 deletions
@@ -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();
+3 -3
View File
@@ -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,
}),
});
+1 -1
View File
@@ -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,
},
+1 -1
View File
@@ -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,
},
+2 -2
View File
@@ -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]);
@@ -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,
},
@@ -37,7 +37,7 @@ const RankAssistantReplies = () => {
const submitResponse = (task) => {
trigger({
id: task.id,
update_type: "post_ranking",
update_type: "message_ranking",
content: {
ranking,
},
@@ -37,7 +37,7 @@ const RankInitialPrompts = () => {
const submitResponse = (task) => {
trigger({
id: task.id,
update_type: "post_ranking",
update_type: "message_ranking",
content: {
ranking,
},
@@ -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]);
},
@@ -37,7 +37,7 @@ const RankUserReplies = () => {
const submitResponse = (task) => {
trigger({
id: task.id,
update_type: "post_ranking",
update_type: "message_ranking",
content: {
ranking,
},