该应用的运作方式如下:我们首先向一个端点发出 POST 请求,该端点要求您在请求正文中传递查询字段。查询必须是集合名称,然后我们将查询传递给一个函数,该函数使用 Gemini 生成代码,通过提供结构良好的提示来提取指定集合中的数据,然后我们将 Gemini 生成的代码写入文件,然后运行节点子进程以执行文件中的代码,通过子节点进程执行代码后,我们将数据传递给另一个函数,该函数使用 Gemini 将代码转换为 JSON,最后将数据返回给用户。我们的目标不仅仅是从合集中获取数据,还希望在未来几周内能够在合集中发布、put、删除和修补数据。之后,我们希望传递给端点的查询类似于“我要提取所有用户,我要删除 ID 为 2 的用户”,gemini 将能够生成能够执行上述查询的代码。
可采用以下设备打造
Web/Chrome
团队
更新者
Elijah Darkeh Agbedam 和 Augustine Love Stephens
发件人
加纳
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],[],[],[],null,["# GEMINI AUTO BACKEND AI PROJECT\n\n[More Apps](/competition/vote) \n\nGEMINI AUTO BACKEND AI PROJECT\n==============================\n\nA Gemini-powered backend service. \nVote \nVoted!\nWhat it does\n\nWhat the app does is, we first of all make a POST request to an endpoint that requires you to pass a query field in the request body. The query must be a collection name, we then pass the query to a function that uses Gemini to generate code that fetches data in the specified collection by giving it a well structured prompt, we then write the code generated by Gemini to a file, then run a node child process to execute the code in the file, after executing the code through the child node process, we then pass the data to another function that uses Gemini to convert the code into a JSON and then finally return the data to the user. Our aim is not to just get data from collections but to also be able to post, put, delete and patch data in a collection in the upcoming weeks. After that, we want the query passed to the enpoint to be like for example \"I want to fetch all users, I want to delete user with id 2\", gemini will be able to generate a code that will be able to perform the above query. \nBuilt with\n\n- Web/Chrome \nTeam \nBy\n\nElijah Darkeh Agbedam and Augustine Love Stephens \nFrom\n\nGhana \n[](/competition/vote)"]]