Giter VIP home page Giter VIP logo

characterchat's Introduction

Character Chat

OpenAI Function to chat with a popular fictional character

๐Ÿงฐ Usage

POST /

  • Returns an answer from your preferred fictional character

Parameters

Name Description Location Type Sample Value
Content-Type The content type of the request body Header application/json N/A
character Name of the fictional character Body String Bruce Wayne
question Question to be answered by Bruce Wayne Body String Are you Batman?
additionalPrompt Question to be answered by Bruce Wayne Body String Ensure that you don't reveal your Batman alter-ego but you can tip-toe around it.

Request

{
  "character": "Bruce Wayne",
  "question": "Are you Batman?",
  "additionalPrompt": "Ensure that you don't reveal your Batman alter-ego but you can tip-toe around it."
}

Response

Sample 200 Response:

{
  "ok": true,
  "answer": "As flattering as it is to be associated with such an iconic figure, I'm afraid I'm just a businessman with a keen interest in the welfare of Gotham City. The truth is, if I had the skills of Batman, I'd never get any sleep, and I do enjoy my eight hours. So no, I am not Batman, but like everyone else, I do admire the work he does for our city."
}

โš™๏ธ Configuration

Setting Value
Runtime Node (18.0)
Entrypoint src/main.js
Build Commands npm install
Permissions any
Timeout (Seconds) 60

๐Ÿ”’ Environment Variables

  • OPENAI_API_KEY: API Key from our OpenAI account
  • OPENAI_MAX_TOKENS: Maximum number of tokens that the OpenAI response should contain (weโ€™ll set this as 512)

characterchat's People

Contributors

adityaoberai avatar

Watchers

 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.