Skip to content

OpenRizz is an API for Generating Pickup/Flirt Lines. It uses Langchain and Langserver+FastAPI in the Backend

License

Notifications You must be signed in to change notification settings

NotoriousArnav/OpenRizz

Repository files navigation

OpenRizz API Documentation

Overview

OpenRizz is a simple API that provides pickup lines and flirt lines. It allows you to generate a response based on the input provided.

Usage

HTTP Request

  • Method: POST
  • URL: http:https://localhost:8000/rizz/invoke
  • Headers: Content-Type: application/json
  • Body: A JSON object with the following structure:
{
    "input": {
        "description": "Your pickup line or flirt line",
        "response_type": "Funny, Flirty, Seductive"
    }
}

Examples

curl

curl --location --request POST 'http:https://localhost:8000/rizz/invoke' \
     --header 'Content-Type: application/json' \
     --data-raw '{
        "input" : {
          "description":"Her name is Shreya. She looks cute and has a Heart of Gold (metaphor)!",
          "response_type":"Funny, Flirty, Seductive"
     }'

Python

import requests

url = "http:https://localhost:8000/rizz/invoke"

payload = "{\"input\": {\"description\": \"Her name is Shreya. She looks cute and has a Heart of Gold (metaphor)!\",\"response_type\": \"Funny, Flirty, Seductive\"}}"
headers = { 'Content-Type': 'application/json' }
response = requests.request("POST", url, headers=headers, data=payload)

Go

package main

import (
	"fmt"
	"io"
	"log"
	"net/http"
	"strings"
)

func main() {
	client := &http.Client{}
	var data = strings.NewReader(`{
        "input" : {
          "description":"Her name is Shreya. She looks cute and has a Heart of Gold (metaphor)!",
          "response_type":"Funny, Flirty, Seductive"}
     }`)
	req, err := http.NewRequest("POST", "http:https://localhost:8000/rizz/invoke", data)
	if err != nil {
		log.Fatal(err)
	}
	req.Header.Set("Content-Type", "application/json")
	resp, err := client.Do(req)
	if err != nil {
		log.Fatal(err)
	}
	defer resp.Body.Close()
	bodyText, err := io.ReadAll(resp.Body)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%s\n", bodyText)
}

JavaScript

fetch('http:https://localhost:8000/rizz/invoke', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    'input': {
      'description': 'Her name is Shreya. She looks cute and has a Heart of Gold (metaphor)!',
      'response_type': 'Funny, Flirty, Seductive'
    }
  })
});

Response

The API will return a response based on the input provided. The response will be in the same format as the input.

About

OpenRizz is an API for Generating Pickup/Flirt Lines. It uses Langchain and Langserver+FastAPI in the Backend

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages