Skip to content

Deprecate self-maintained openai go lib#6

Merged
spideyz0r merged 3 commits into
mainfrom
use-upstream-openai-lib
Nov 28, 2025
Merged

Deprecate self-maintained openai go lib#6
spideyz0r merged 3 commits into
mainfrom
use-upstream-openai-lib

Conversation

@spideyz0r
Copy link
Copy Markdown
Owner

No description provided.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR migrates from a self-maintained OpenAI Go library (github.com/spideyz0r/openai-go) to the official OpenAI Go SDK (github.com/openai/openai-go). The changes update the Go version to 1.22 and refactor all OpenAI API interactions to use the official library's types and methods.

Key Changes:

  • Replaced self-maintained spideyz0r/openai-go with official openai/openai-go v1.12.0
  • Updated Go version from 1.19 to 1.22
  • Refactored API calls to use the official SDK's Chat.Completions.New() method with proper parameter structs

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 3 comments.

File Description
main.go Updated imports, client initialization, message construction using helper functions (SystemMessage, UserMessage), and API call method to use official SDK patterns
go.mod Updated Go version to 1.22, replaced deprecated library with official OpenAI SDK, added transitive dependencies
go.sum Added checksums for new dependencies (openai-go, tidwall utilities) and updated golang.org/x/net version

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread main.go
Comment thread main.go
Comment thread main.go
Copy link
Copy Markdown
Contributor

Copilot AI commented Nov 28, 2025

@spideyz0r I've opened a new pull request, #7, to work on those changes. Once the pull request is ready, I'll request review from you.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
- Add AI responses to conversation context for proper chat flow
- Fix type conversion issue in stdin mode (remove unnecessary string() cast)
- Fix missing closing brace in sendMessage function
- All unit tests now passing
@spideyz0r spideyz0r merged commit fe6a1e3 into main Nov 28, 2025
1 check passed
@spideyz0r spideyz0r deleted the use-upstream-openai-lib branch November 28, 2025 23:52
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.

3 participants