Skip to content

Appwrite function to enable chatting with fictional characters

Notifications You must be signed in to change notification settings

adityaoberai/CharacterChat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)

About

Appwrite function to enable chatting with fictional characters

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published