Add dev container to open in GitHub Codespace#14
Open
blackgirlbytes wants to merge 22 commits intoopenai:mainfrom
Open
Add dev container to open in GitHub Codespace#14blackgirlbytes wants to merge 22 commits intoopenai:mainfrom
blackgirlbytes wants to merge 22 commits intoopenai:mainfrom
Conversation
joshspicer
reviewed
May 1, 2023
joshspicer
reviewed
May 1, 2023
joshspicer
reviewed
May 1, 2023
joshspicer
reviewed
May 1, 2023
Co-authored-by: Josh Spicer <josh@joshspicer.com>
Co-authored-by: Josh Spicer <josh@joshspicer.com>
joshspicer
reviewed
May 1, 2023
joshspicer
reviewed
May 1, 2023
joshspicer
reviewed
May 1, 2023
Co-authored-by: Josh Spicer <josh@joshspicer.com>
Co-authored-by: Josh Spicer <josh@joshspicer.com>
Co-authored-by: Samruddhi Khandale <samruddhikhandale@github.com>
chrmarti
reviewed
May 3, 2023
Author
|
I wrote this DEV post to explain the changes that I made and help create awareness around Codespaces + ChatGPT plugins : https://dev.to/github/chatgpt-meets-github-codespaces-how-im-optimizing-chatgpt-quickstart-plugins-for-remote-development-5bc8 Hopefully this will be helpful for the OpenAI team and the Codespaces team. |
jongio
reviewed
May 10, 2023
| @@ -0,0 +1,13 @@ | |||
| #!/bin/bash | |||
There was a problem hiding this comment.
Instead of this, we can update the file to have $host placeholder and then replace with host header. For codespaces, the original host is in x-forwarded-host.
"api": {
"type": "openapi",
"is_user_authenticated": "false",
"url": "$host/.well-known/openapi.yaml"
},
"logo_url": "$host/.well-known/logo.png",
@app.get("/.well-known/ai-plugin.json")
async def plugin_manifest(request: Request):
"""
Returns the ai-plugin.json from .well-known location
"""
host_header = request.headers.get("X-Forwarded-Host") or request.headers.get("Host")
with open(".well-known/ai-plugin.json") as f:
return Response(
content=Template(f.read()).substitute(host=f"https://{host_header}"),
media_type="application/json",
)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I added a devcontainer to this repository along with instructions in the README for how a user can get started.
To test out this implementation, follow the steps for the README using either of the following:
It should work in the two indicated above.
What's happening in this PR?
Questions/Concerns
Looking for review
I am looking for review from Logan and anyone on the Open AI team. I am also looking for review from anyone on the GitHub side, especially folks within the Codespaces team.
Thank you so much for this opportunity. It was fun!
cc: @logankilpatrick