-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: updating gsxChatCompletion example (#240)
Renames the `openai-v-next` example to `gsxChatCompletion` and updating the readme.
- Loading branch information
1 parent
b4bd922
commit fd8c6ef
Showing
9 changed files
with
39 additions
and
39 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains 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,31 @@ | ||
# GsxChatCompletion Examples | ||
|
||
This example demonstrates different ways the `GSXChatCompletion` component can be used. It includes six smaller examples showing how you can use `GSXChatCompletion` for | ||
|
||
- Basic chat completions | ||
- Streaming completions | ||
- Tools | ||
- Structured output | ||
- Multi-step tool workflows | ||
|
||
## Usage | ||
|
||
```bash | ||
# Install dependencies | ||
pnpm install | ||
|
||
# Set your OpenAI API key | ||
export OPENAI_API_KEY=<your_api_key> | ||
|
||
# Run the example | ||
pnpm run start | ||
``` | ||
|
||
You can choose which example to run by changing the `example` variable in `index.tsx`. The available examples are: | ||
|
||
- `basicCompletion` - Simple chat completion with a system prompt and user message | ||
- `streamingCompletion` - Real-time streaming of chat responses | ||
- `tools` - Using tools with a simple weather tool example | ||
- `toolsStreaming` - Using tools with streaming responses | ||
- `structuredOutput` - Generating structured outputs with a Zod schema | ||
- `multiStepTools` - Using tools in a multi-step workflow |
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
examples/openai-v-next/package.json → examples/gsxChatCompletion/package.json
This file contains 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
File renamed without changes.
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.