-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add playground documentation to navigation #416
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| --- | ||
| title: "Praison AI Agents Playground" | ||
| sidebarTitle: "Playground" | ||
| description: "Interactive environment to test and run your AI Agents" | ||
| icon: "code" | ||
| --- | ||
|
|
||
| <iframe | ||
| id="codeExecutionFrame" | ||
| src="https://code-execution-server-praisonai.replit.app/?code=import%20openai%0A%0Aclient%20%3D%20openai.OpenAI()%0Aresult%20%3D%20client.chat.completions.create(%0A%20%20%20%20model%3D%22gpt-3.5-turbo%22%2C%0A%20%20%20%20messages%3D%5B%0A%20%20%20%20%20%20%20%20%7B%22role%22%3A%20%22user%22%2C%20%22content%22%3A%20%22Hello%20World%22%7D%0A%20%20%20%20%5D%0A)%0A%0Aprint(result.choices%5B0%5D.message.content)" | ||
| width="100%" | ||
| height="800px" | ||
| frameborder="0" | ||
| allow="clipboard-read; clipboard-write" | ||
| scrolling="yes" | ||
| onload="resizeIframe(this)" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| ></iframe> | ||
|
|
||
| ## How to Use the Playground | ||
|
|
||
| 1. The code editor is pre-loaded with a simple example using Praison AI Agents | ||
| 2. Modify the code as needed for your experiments | ||
| 3. Click "Run" to execute the code and see the results | ||
| 4. Use the playground to test concepts from the course or your own ideas | ||
|
|
||
| <CardGroup cols={2}> | ||
| <Card title="API Documentation" icon="book" href="https://docs.praison.ai"> | ||
| Reference the Praison AI Agents documentation for more examples | ||
| </Card> | ||
| <Card title="Back to Course" icon="arrow-left" href="/course/agents/01-introduction"> | ||
| Return to the AI Agents course | ||
| </Card> | ||
| </CardGroup> | ||
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The URL in the
srcattribute is quite long and includes encoded characters. While this is functional, consider if there's a way to simplify this, perhaps by moving the initial code to a separate file and referencing it, or by using a more readable format for the URL parameters. This would improve maintainability.