Giter Site home page Giter Site logo

duckduckgo-ai's Introduction

DuckDuckGo AI

中文说明

Deploy a free DuckDuckGo AI using Cloudflare Worker, supporting models like gpt-3.5-turbo-0125,claude-3-haiku-20240307, ...

DuckDuckGo AI: https://duckduckgo.com/?q=DuckDuckGo&ia=chat

Deployment

Deploy to Cloudflare Workers

git clone https://github.com/anhao/duckduckgo-ai.git
cd duckduckgo-ai
npm install
npm run deploy

Supported Models

  • gpt-3.5-turbo-0125
  • claude-3-haiku-20240307
  • meta-llama/Llama-3-70b-chat-hf
  • mistralai/Mixtral-8x7B-Instruct-v0.1

Usage

Replace worker_url with your own:

curl https://worker_url/v1/chat/completions \
-H "Authorization: Bearer $YOU_APIKEY" \
-H "Content-Type: application/json" \
-d '{
    "model": "gpt-3.5-turbo-0125",
    "messages": [{"role": "user", "content": "Hello"}],
}'

Authorization Access

In the wrangler.toml file, set the value of the apikey parameter. If not set, anyone can make requests.

[vars]
apikey = "" ## Set the apikey value, if not set, anyone can make requests.

Known Issues

Currently, it does not support continuous dialogue, meaning the messages can only be passed once.

If you want to pass multiple messages, you need to manually pass the x-vqd-4 parameter value to the request header.

The x-vqd-4 parameter will be returned in the response header after the first dialogue, and subsequent requests need to pass the x-vqd-4 value. A new x-vqd-4 parameter is required for each new dialogue added.

  • Automatically pass the x-vqd-4 by storing the conversation hash in Cloudflare KV

duckduckgo-ai's People

Contributors

anhao avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.