Jan
10
2023
10
2023
Using OpenAI API with WebRequest from Unity
Simple example for calling openAI completions API, with simple webrequest (and JSON data).
Repository:
https://github.com/unitycoder/UnityOpenAIGPT3

Making of video:
Related Posts
4 Comments + Add Comment
Leave a comment
Recent posts
- Favorites in PackageManager
- LudumDare59 : Signal
- Unity Editor: Tree Generator
- Leaf/Foliage Generator Tools (Runs in Browser)
- Testing Unity AI Beta
- Ways to Support UnityCoder Development
- Using UI Slider to Create 5-Star Rating Element
- Game Music Library For Unity (editor plugin)
- Fontastic : Easily Test Fonts in Unity Editor!
- GeoTiff Importer & Terrain Generator for Unity
- Create Baked DropShadow for UI images
- .JP2 Ortho Image Converter to PNG/JPG/TIFF
Recent Comments
- on Mesh Exploder (sources)
- on Sprite Sheet Flip Book Shader
- on Sprite Sheet Flip Book Shader
- on [Asset Store] PolygonCollider2D Optimizer
- on Trajectory Test Scene 2.0
- on Vector3 maths for dummies!
- on UnityHub 3.6.0: Remove Version Control & Cloud Dashboard columns
- on Using RenderDoc with Unity (graphics debugger)
Support my work at Bags.fm:
Coin:
Coin:
CUgDSbRqFcAumDSAcdKDvuXsw26VdkJe8C8WGUQHBAGS
Subscribe to Blog via Email
Tag Cloud
2d
3D
AI
algorithm
android
asset
build
color
custom
demo
editor
effect
fake
free
game
generator
greasemonkey
indie
javascript
light
line
ludumdare
mesh
paint
particles
physics
plugin
procedural
proto
prototype
script
sea
shader
shadow
sprite
terrain
texture
tutorial
ui
unity
vertex
visibility
water
waves
webgl
An article by












[…] 10.01.2023: New example project here, uses webrequest, doesn’t require any DLL files https://unitycoder.com/blog/2023/01/10/using-openai-api-with-webrequest-from-unity/ […]
at the start of the video you showed an engine class, the one that contains the OpenAI engines.I am not understanding how to get it, from where?
it was from the old project, with DLL for it, but couldnt get it working anymore:
https://unitycoder.com/blog/2022/02/05/using-open-ai-gpt-3-api-in-unity/
Now there are few better alternatives,
https://github.com/unitycoder/UnityOpenAIGPT3/wiki/Alternatives
[…] First tried to fix the previous Openai DLL version, but then converted into pure webrequest version.. Repository: https://github.com/unitycoder/UnityOpenAIGPT3 No external DLL’s needed, like in previous video: https://www.youtube.com/watch?v=Suabq44rhzY Note: If you get 429 errors, go try in openai playground, if you have already used all free credits: https://beta.openai.com/playground Website: https://unitycoder.com/blog/2023/01/10/using-openai-api-with-webrequest-from-unity/ […]