Has anyone successfully connected to the openai API from Solar2d?
I am trying to connect to the openai.com API, and going in circles. There is lua code to connect, but it is designed for use directly from lua on a computer with openai installed. I have downloaded the openai code but am having trouble getting it to work – I seem to be stuck on the ssl part (can’t find ssl.core). Here is what I have done.
- downloaded the init.lua from openai lua API code: GitHub - leafo/lua-openai: OpenAI API bindings for Lua
→ can’t find cjson: I just substituted json
→ can’t find tableshape - download tableshape.lua and the init etc: GitHub - leafo/tableshape: Test the shape or structure of a Lua table, inspired by React.PropTypes & LPeg
→ can’t find ssl - downloaded ssl files: gmod_luasec/includes/modules/ssl.https.lua at master · danielga/gmod_luasec · GitHub
Included ssl.lua, ssl.https.lua,ssl.x509.lua,ssl.context.lua,ssl.htttps.co.lua. I put them in an ssl subdirectory (removing ssl from the name) so it could find them, and it did.
→ can’t find ssl.core
How do I get out of this, or reference ssl.core? Supposed to be bundled into ssl, so I am a bit of a loss.