68
69 try {
70 const response = await fetch("/generate-blog", {
71 method: "POST",
72 headers: {
4let location = "Asia, Taipei";
5let lang = "zh-TW";
6const weather = await fetch(
7 `https://wttr.in/${location}?lang=${lang}&format=j1`,
8).then(r => r.json());
182
183 try {
184 const response = await fetch("/", {
185 method: "POST",
186 body: JSON.stringify({
182
183 try {
184 const response = await fetch("/", {
185 method: "POST",
186 body: JSON.stringify({
182
183 try {
184 const response = await fetch("/", {
185 method: "POST",
186 body: JSON.stringify({
194 try {
195 const filesBase64 = await Promise.all(files.map(fileToBase64));
196 const response = await fetch("/chat", {
197 method: "POST",
198 headers: { "Content-Type": "application/json" },
52 }
53
54 const response = await fetch("/generate-prompts", {
55 method: "POST",
56 body: formData,
86 setIsLoading(true);
87 try {
88 const response = await fetch("/clarify-prompts", {
89 method: "POST",
90 headers: {
182
183 try {
184 const response = await fetch("/", {
185 method: "POST",
186 body: JSON.stringify({
34
35 try {
36 const response = await fetch("/generate-prompts", {
37 method: "POST",
38 headers: {
71 setIsLoading(true);
72 try {
73 const response = await fetch("/clarify-prompts", {
74 method: "POST",
75 headers: {
182
183 try {
184 const response = await fetch("/", {
185 method: "POST",
186 body: JSON.stringify({