Skip to content

Commit

Permalink
docs: updating gsxChatCompletion example (#240)
Browse files Browse the repository at this point in the history
Renames the `openai-v-next` example to `gsxChatCompletion` and updating
the readme.
  • Loading branch information
dereklegenzoff authored Feb 14, 2025
1 parent b4bd922 commit fd8c6ef
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 39 deletions.
File renamed without changes.
31 changes: 31 additions & 0 deletions examples/gsxChatCompletion/README.md
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.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@gensx-examples/openai-v-next",
"name": "@gensx-examples/gsx-chat-completion",
"private": true,
"version": "0.0.0",
"type": "module",
Expand Down
File renamed without changes.
31 changes: 0 additions & 31 deletions examples/openai-v-next/README.md

This file was deleted.

14 changes: 7 additions & 7 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit fd8c6ef

Please sign in to comment.