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

Fix README: pass options as pointers #250

Merged
merged 1 commit into from
Jun 24, 2024
Merged

Conversation

jhillyerd
Copy link
Contributor

@jhillyerd jhillyerd commented Jun 24, 2024

Proposed changes

Update README examples to pass option structs as pointers, as is expected by
the API.

Types of changes

What types of changes does your code introduce to the community Go SDK?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update or tests (if none of the other choices apply)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • I have read the CONTRIBUTING doc
  • I have lint'ed all of my code using repo standards
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Summary by CodeRabbit

  • Documentation
    • Updated code examples in the README to reflect changes in how options structures are declared, now using pointers for improved clarity.

@jhillyerd jhillyerd requested a review from davidvonthenen June 24, 2024 22:45
Copy link

coderabbitai bot commented Jun 24, 2024

Walkthrough

The recent changes involve altering the declarations of the options and transcriptOptions variables in the codebase. Instead of using value types for PreRecordedTranscriptionOptions and LiveTranscriptionOptions, the updated code now uses pointers to these structures. This reflects a shift towards utilizing pointers for option configurations, which can enhance efficiency and flexibility in managing transcription options.

Changes

Files Change Summary
README.md Updated options and transcriptOptions to be pointer types in PreRecordedTranscriptionOptions and LiveTranscriptionOptions.
.../interfaces/PreRecordedTranscriptionOptions.go Changed declaration of options to a pointer type.
.../interfaces/LiveTranscriptionOptions.go Changed declaration of transcriptOptions to a pointer type.

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between c1872dc and ac10876.

Files selected for processing (1)
  • README.md (2 hunks)
Additional context used
LanguageTool
README.md

[duplication] ~7-~7: Possible typo: you repeated a word (ENGLISH_WORD_REPEAT_RULE)
Context: ...eech understanding API. - Deepgram Go SDK - SDK Documentation - [G...


[style] ~32-~32: This phrase is redundant (‘I’ stands for ‘Interfaces’). Use simply “APIInterfaces”. (ACRONYM_TAUTOLOGY)
Context: ...ram-go-sdk@main/pkg/api/live/v1) - Live API Interfaces - [https://pkg.go.dev/github.com/deepgr...


[style] ~38-~38: This phrase is redundant (‘I’ stands for ‘Interfaces’). Use simply “APIInterfaces”. (ACRONYM_TAUTOLOGY)
Context: ...n/pkg/api/prerecorded/v1) - PreRecorded API Interfaces - [https://pkg.go.dev/github.com/deepgr...


[style] ~44-~44: This phrase is redundant (‘I’ stands for ‘Interfaces’). Use simply “APIInterfaces”. (ACRONYM_TAUTOLOGY)
Context: ...m-go-sdk@main/pkg/api/speak/v1) - Speak API Interfaces - [https://pkg.go.dev/github.com/deepgr...


[style] ~50-~50: This phrase is redundant (‘I’ stands for ‘Interfaces’). Use simply “APIInterfaces”. (ACRONYM_TAUTOLOGY)
Context: ...-sdk@main/pkg/api/analyze/v1) - Analyze API Interfaces - [https://pkg.go.dev/github.com/deepgr...


[style] ~56-~56: This phrase is redundant (‘I’ stands for ‘Interfaces’). Use simply “APIInterfaces”. (ACRONYM_TAUTOLOGY)
Context: ...go-sdk@main/pkg/api/manage/v1) - Manage API Interfaces -[https://pkg.go.dev/github.com/deepgra...


[uncategorized] ~76-~76: A comma may be missing after the conjunctive/linking adverb ‘However’. (SENT_START_CONJUNCTIVE_LINKING_ADVERB_COMMA)
Context: ... clients shouldn't need to know about. However you can still tweak options and setting...


[misspelling] ~147-~147: Use “a” instead of ‘an’ if the following word doesn’t start with a vowel sound, e.g. ‘a sentence’, ‘a university’. (EN_A_VS_AN)
Context: ...amples/prerecorded/file/main.go) - From an URL - [examples/prerecorded/url](https:...


[duplication] ~157-~157: Possible typo: you repeated a word (ENGLISH_WORD_REPEAT_RULE)
Context: ... Save audio to a Path - examples/speak/save - Save audio to a user-defined Writer - [examp...


[uncategorized] ~171-~171: A comma might be missing here. (AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)
Context: ...ples/manage/usage/main.go) To run each example set the DEEPGRAM_API_KEY as an enviro...


[style] ~175-~175: To make your writing clearer, consider a more direct alternative. (AS_A_MEANS_TO)
Context: ... ## Logging This SDK provides logging as a means to troubleshoot and debug issues encountered. By defaul...


[style] ~175-~175: In American English, abbreviations like “etc.” require a period. (ETC_PERIOD)
Context: ...ages and higher (ie Warning, Error, etc) when you initialize the library as fol...


[uncategorized] ~206-~206: A comma might be missing here. (AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)
Context: ... ### Getting Help We love to hear from you so if you have questions, comments or f...


[style] ~207-~207: This expression usually appears with a “please” in front of it. (INSERT_PLEASE)
Context: ... comments or find a bug in the project, let us know! You can either: - [Open an issue in t...

Additional comments not posted (2)
README.md (2)

91-91: Documentation Update: Passing Options as Pointers

The change correctly updates the options variable to be a pointer to PreRecordedTranscriptionOptions. This aligns with the expected API usage and helps prevent potential issues with mutable shared state.


111-111: Documentation Update: Update to Pointer for Live Transcription Options

This change updates the transcriptOptions variable to be a pointer. This modification is consistent with the API's expectations and ensures that the example in the README is correct and up-to-date.

@davidvonthenen
Copy link
Contributor

Nice catch @jhillyerd !

@davidvonthenen davidvonthenen merged commit b027b64 into main Jun 24, 2024
2 checks passed
@davidvonthenen davidvonthenen deleted the jhillyerd/readme branch June 24, 2024 23:12
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.

2 participants