Comments (6)
Also relevant, using function call to generate guaranteed JSON response
https://yonom.substack.com/p/native-json-output-from-gpt-4
from discord-bots.
Another option could be to host on "edge server" like google cloud functions or cloudflare using discord's web hook. Essentially to register the application hooks for discord, then the event can send a webhook to the cloud function which fires the actual logic to fetch a response from open ai api server. Here is example docs for discord webhook w/cloudflare worker:
https://discord.com/developers/docs/tutorials/hosting-on-cloudflare-workers
from discord-bots.
WIP https://github.com/Algorush/text-to-street/blob/main/README.md
from discord-bots.
hosting and access questions
-
how to host the bot and respond to inquiries: for now Discord seems like the easiest solution since there is no mechanism to add to app at the moment. suggest using the discord bot cloudflare example but adapt to firebase: https://discord.com/developers/docs/tutorials/hosting-on-cloudflare-workers
-
how to access the results - brainstorm of ideas
- create new street json file and add new entry in firestore database under a robot user -- might be easiest with existing infrastructure. then to provide the URL of scene to access
suggestions for ease of deployment:
- convert to node / javascript instead of python like existing firebase functions
- use existing config/.env and add openai and discord keys to that and/or gcp secret where .env is stored too
from discord-bots.
After thinking about how we will support this, here are the next steps:
for sep 28 live demo - keep in python?
- new repo or just fork into 3dstreet?
- make it easier to see output scene. ie downloadable or copy/pasteable (or even create file)
- debug existing performance - create a few example test cases with expected output
- consider prompt change / other functional improvements?
- Output: opens browser tab with new file? title is prompt from user?
- later v2 idea: basic ui to open input dialog in browser, then a processing icon, then show the scene with title
for deployment - convert to JS
- convert to javascript instead of python function
- hook up to discord api to register function per cloudflare example
- openai and discord api keys, add to existing development .env file and reference somehow, or use separate gcp secret that the firebase function can access?
from discord-bots.
follow more in this repo 3DStreet/text-to-street#1
from discord-bots.
Related Issues (2)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from discord-bots.