BasedDevelopment / aiChan

discord bot for openAI with complete chat feature(using redis and discord threads) and image generation
GNU Affero General Public License v3.0
1 stars 1 forks source link

allow user to specify params #6

Open ezrizhu opened 1 year ago

ezrizhu commented 1 year ago

ai! prompt here ?model=modelName&temp=1&fp=1&pp=1&tp=1

fp: Frequency penalty pp: Presence penalty tp: top p

See available parameters here with the playground https://platform.openai.com/playground

curl https://api.openai.com/v1/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -d '{
  "model": "text-davinci-003",
  "prompt": "hi",
  "temperature": 0,
  "max_tokens": 100,
  "top_p": 1,
  "frequency_penalty": 0.0,
  "presence_penalty": 0.0
}'
ezrizhu commented 5 months ago

should prlly just use slashcommands for this..