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

[masterbots.ai] 🛠️ Refactor suggestion: Return stringify output examples #307

Open
AndlerRL opened this issue Nov 14, 2024 · 0 comments

Comments

@AndlerRL
Copy link
Contributor

Structure the output as a proper JSON object.

Instead of returning a template string with markdown formatting, consider returning a structured JSON object that can be formatted by the client.

Consider this structure:

-      return `${results}
-      
-      ## Output Example:
-      ...`
+      return JSON.stringify({
+        results: {
+          score: {
+            brewers: 9,
+            dodgers: 2
+          },
+          summary: results,
+          highlights: {
+            homeruns: ['Yelich'],
+            winningPitcher: 'J. Junis'
+          },
+          sources: [
+            'https://website1.com/',
+            'https://website2.com/'
+          ]
+        }
+      })

Committable suggestion skipped: line range outside the PR's diff.

Originally posted by @coderabbitai[bot] in #302 (comment)

@AndlerRL AndlerRL changed the title _:hammer_and_wrench: Refactor suggestion_: Return stringify output examples 🛠️ Refactor suggestion: Return stringify output examples Nov 14, 2024
@AndlerRL AndlerRL changed the title 🛠️ Refactor suggestion: Return stringify output examples [masterbots.ai] 🛠️ Refactor suggestion: Return stringify output examples Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant