Skip to content
This repository was archived by the owner on Feb 27, 2025. It is now read-only.

mesopelagique/ChatGPT4D

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

ChatGPT4D

Warning

This project call old OpenAI endpoints. Do not use it. It's just an old proof of concept

Simple call to ChatGPT API using 4D.HTTPRequest

Usage

You need an API Key, by loging to openai and get one here https://beta.openai.com/account/api-keys

$chat:=cs.ChatGPT.new()
$chat.token:="xxx"  // get it from https://beta.openai.com/account/api-keys

$result:=$chat.prompt($prompt)

$allMessages=$result.choices.map(Formula($1.value.text)).join("\n"))

see test.4dm for a full example

For instance I ask if ChatGTP know the 4D Language (to code for me)

ChatGTPAbout4D

About

Call ChatGPT api using 4D HTTPRequest

Topics

Resources

Stars

Watchers

Forks

Contributors 2

  •  
  •  

Languages