Skip to content
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

Update stream chat completions API cookbook #1172

Merged
merged 2 commits into from
May 6, 2024
Merged

Conversation

brianz-openai
Copy link
Contributor

@brianz-openai brianz-openai commented May 1, 2024

Summary

image

Motivation

Why are these changes necessary? How do they improve the cookbook?


For new content

When contributing new content, read through our contribution guidelines, and mark the following action items as completed:

  • I have added a new entry in registry.yaml (and, optionally, in authors.yaml) so that my content renders on the cookbook website.
  • I have conducted a self-review of my content based on the contribution guidelines:
    • Relevance: This content is related to building with OpenAI technologies and is useful to others.
    • Uniqueness: I have searched for related examples in the OpenAI Cookbook, and verified that my content offers new insights or unique information compared to existing documentation.
    • Spelling and Grammar: I have checked for spelling or grammatical mistakes.
    • Clarity: I have done a final read-through and verified that my submission is well-organized and easy to understand.
    • Correctness: The information I include is correct and all of my code executes successfully.
    • Completeness: I have explained everything fully, including all necessary references and citations.

We will rate each of these areas on a scale from 1 to 4, and will only accept contributions that score 3 or higher on all areas. Refer to our contribution guidelines for more details.

@brianz-openai brianz-openai force-pushed the brian/stream-usage branch 2 times, most recently from ed18e29 to c4cbac4 Compare May 1, 2024 20:59
Copy link

@owencm owencm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@owencm
Copy link

owencm commented May 2, 2024

Actually one quick thought, can we link to the relevant part of the API reference (the usage key in the chunk section and the stream_option section of the request section?)

The current plan is for the tweet to link to this section of this cookbook, so this will get quite a lot of traffic and it'd be nice if it linked through to the other resources nicely.

@owencm
Copy link

owencm commented May 2, 2024

Also let's mention in this cookbook that choices will be [] in this case, since I think this will require a code change for a lot of people

@brianz-openai
Copy link
Contributor Author

brianz-openai commented May 2, 2024

updated. Also updated the screenshot in the PR description.

@brianz-openai brianz-openai merged commit dc0e64a into main May 6, 2024
@brianz-openai brianz-openai deleted the brian/stream-usage branch May 6, 2024 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants