Skip to content
TheChatArchiveThe Chat Archive
gpt-4o-search-preview· OpenAIHugging Face LMArena Search Arena 24K

https://technical.city/zh/cpu/best-price-to-performance?pg=1&sortfield=type&sortorder=up…

From a Chatbot Arena battleThe same person sent this prompt to two anonymous models at once. Compare it with Perplexitysonar-pro’s answer.
  1. User

    https://technical.city/zh/cpu/best-price-to-performance?pg=1&sort_field=type&sort_order=up

    我要做一个静态网页,跟这个一模一样,但是价格有我自己设计一个API来输入。

  2. Assistant

    要创建一个与您提供的链接相似的静态网页,并通过您设计的 API 输入价格信息,您可以按照以下步骤进行:

    1. 设计前端页面:使用 HTML、CSS 和 JavaScript 构建静态网页,确保其布局和功能与参考页面相似。

    2. 开发后端 API:创建一个 API 来提供处理器的价格信息。您可以使用以下方法之一:

      • 使用 Azure Functions:Azure Functions 是一种无服务器计算服务,允许您编写小型的、专注的代码片段(函数),这些函数可以通过 HTTP 请求触发。您可以将 Azure Functions 与 Azure Static Web Apps 集成,以提供后端 API。详细步骤请参考 使用 Azure Functions 将 API 添加到 Azure 静态 Web 应用。

      • 使用 roapi 工具:如果您的价格数据存储在静态文件中(如 CSV、JSON、SQLite 等),可以使用 roapi 工具快速为这些静态数据生成 API。roapi 支持多种查询形式,如 REST API、SQL 查询和 GraphQL。安装和使用方法请参考 牛逼,快速为静态数据生成 API。

    3. 集成前端和后端:在前端页面中,使用 JavaScript 的 fetch 或其他 HTTP 请求方法,从您开发的 API 获取价格数据,并将其动态渲染到网页上。

    4. 部署静态网页和 API:将您的静态网页和 API 部署到服务器或托管平台上,确保它们可以正常运行并相互通信。

    通过以上步骤,您可以创建一个与参考链接相似的静态网页,并通过自定义的 API 输入价格信息。

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.

Identical first prompt