diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml
deleted file mode 100644
index e36c38239..000000000
--- a/.github/FUNDING.yml
+++ /dev/null
@@ -1,3 +0,0 @@
-# These are supported funding model platforms
-
-github: [sashabaranov, vvatanabe]
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
index 536a2ee29..18acc2c8d 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -1,14 +1,13 @@
---
name: Bug report
about: Create a report to help us improve
-title: ''
+title: ""
labels: bug
-assignees: ''
-
+assignees: ""
---
Your issue may already be reported!
-Please search on the [issue tracker](https://github.com/sashabaranov/go-openai/issues) before creating one.
+Please search on the [issue tracker](https://github.com/incard/go-openai/issues) before creating one.
**Describe the bug**
A clear and concise description of what the bug is. If it's an API-related bug, please provide relevant endpoint(s).
@@ -23,10 +22,11 @@ A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem. For non-graphical issues, please provide any relevant logs or stack traces.
**Environment (please complete the following information):**
- - go-openai version: [e.g. v1.12.0]
- - Go version: [e.g. 1.18]
- - OpenAI API version: [e.g. v1]
- - OS: [e.g. Ubuntu 20.04]
+
+- go-openai version: [e.g. v1.12.0]
+- Go version: [e.g. 1.18]
+- OpenAI API version: [e.g. v1]
+- OS: [e.g. Ubuntu 20.04]
**Additional context**
Add any other context about the problem here.
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md
index 2359e5c00..e4cc6cb7f 100644
--- a/.github/ISSUE_TEMPLATE/feature_request.md
+++ b/.github/ISSUE_TEMPLATE/feature_request.md
@@ -1,14 +1,13 @@
---
name: Feature request
about: Suggest an idea for this project
-title: ''
+title: ""
labels: enhancement
-assignees: ''
-
+assignees: ""
---
Your issue may already be reported!
-Please search on the [issue tracker](https://github.com/sashabaranov/go-openai/issues) before creating one.
+Please search on the [issue tracker](https://github.com/incard/go-openai/issues) before creating one.
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
index 222c065ce..e96a862f3 100644
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -1,5 +1,5 @@
A similar PR may already be submitted!
-Please search among the [Pull request](https://github.com/sashabaranov/go-openai/pulls) before creating one.
+Please search among the [Pull request](https://github.com/incard/go-openai/pulls) before creating one.
If your changes introduce breaking changes, please prefix the title of your pull request with "[BREAKING_CHANGES]". This allows for clear identification of such changes in the 'What's Changed' section on the release page, making it developer-friendly.
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 4dd184042..0070a82ab 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,22 +1,28 @@
# Contributing Guidelines
## Overview
-Thank you for your interest in contributing to the "Go OpenAI" project! By following this guideline, we hope to ensure that your contributions are made smoothly and efficiently. The Go OpenAI project is licensed under the [Apache 2.0 License](https://github.com/sashabaranov/go-openai/blob/master/LICENSE), and we welcome contributions through GitHub pull requests.
+
+Thank you for your interest in contributing to the "Go OpenAI" project! By following this guideline, we hope to ensure that your contributions are made smoothly and efficiently. The Go OpenAI project is licensed under the [Apache 2.0 License](https://github.com/incard/go-openai/blob/master/LICENSE), and we welcome contributions through GitHub pull requests.
## Reporting Bugs
-If you discover a bug, first check the [GitHub Issues page](https://github.com/sashabaranov/go-openai/issues) to see if the issue has already been reported. If you're reporting a new issue, please use the "Bug report" template and provide detailed information about the problem, including steps to reproduce it.
+
+If you discover a bug, first check the [GitHub Issues page](https://github.com/incard/go-openai/issues) to see if the issue has already been reported. If you're reporting a new issue, please use the "Bug report" template and provide detailed information about the problem, including steps to reproduce it.
## Suggesting Features
-If you want to suggest a new feature or improvement, first check the [GitHub Issues page](https://github.com/sashabaranov/go-openai/issues) to ensure a similar suggestion hasn't already been made. Use the "Feature request" template to provide a detailed description of your suggestion.
+
+If you want to suggest a new feature or improvement, first check the [GitHub Issues page](https://github.com/incard/go-openai/issues) to ensure a similar suggestion hasn't already been made. Use the "Feature request" template to provide a detailed description of your suggestion.
## Reporting Vulnerabilities
-If you identify a security concern, please use the "Report a security vulnerability" template on the [GitHub Issues page](https://github.com/sashabaranov/go-openai/issues) to share the details. This report will only be viewable to repository maintainers. You will be credited if the advisory is published.
+
+If you identify a security concern, please use the "Report a security vulnerability" template on the [GitHub Issues page](https://github.com/incard/go-openai/issues) to share the details. This report will only be viewable to repository maintainers. You will be credited if the advisory is published.
## Questions for Users
-If you have questions, please utilize [StackOverflow](https://stackoverflow.com/) or the [GitHub Discussions page](https://github.com/sashabaranov/go-openai/discussions).
+
+If you have questions, please utilize [StackOverflow](https://stackoverflow.com/) or the [GitHub Discussions page](https://github.com/incard/go-openai/discussions).
## Contributing Code
-There might already be a similar pull requests submitted! Please search for [pull requests](https://github.com/sashabaranov/go-openai/pulls) before creating one.
+
+There might already be a similar pull requests submitted! Please search for [pull requests](https://github.com/incard/go-openai/pulls) before creating one.
### Requirements for Merging a Pull Request
@@ -33,6 +39,7 @@ The requirements to accept a pull request are as follows:
The merging method for pull requests in this repository is squash merge.
### Creating a Pull Request
+
- Fork the repository.
- Create a new branch and commit your changes.
- Push that branch to GitHub.
@@ -42,9 +49,11 @@ The merging method for pull requests in this repository is squash merge.
If your changes introduce breaking changes, please prefix your pull request title with "[BREAKING_CHANGES]".
### Code Style
+
In this project, we adhere to the standard coding style of Go. Your code should maintain consistency with the rest of the codebase. To achieve this, please format your code using tools like `goimports` and resolve any syntax or style issues with `golangci-lint`.
**Run goimports:**
+
```
go install golang.org/x/tools/cmd/goimports@latest
```
@@ -54,6 +63,7 @@ goimports -w .
```
**Run golangci-lint:**
+
```
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
```
@@ -63,20 +73,24 @@ golangci-lint run --out-format=github-actions
```
### Unit Test
+
Please create or update tests relevant to your changes. Ensure all tests run successfully to verify that your modifications do not adversely affect other functionalities.
**Run test:**
+
```
go test -v ./...
```
### Integration Test
-Integration tests are requested against the production version of the OpenAI API. These tests will verify that the library is properly coded against the actual behavior of the API, and will fail upon any incompatible change in the API.
+
+Integration tests are requested against the production version of the OpenAI API. These tests will verify that the library is properly coded against the actual behavior of the API, and will fail upon any incompatible change in the API.
**Notes:**
These tests send real network traffic to the OpenAI API and may reach rate limits. Temporary network problems may also cause the test to fail.
**Run integration test:**
+
```
OPENAI_TOKEN=XXX go test -v -tags=integration ./api_integration_test.go
```
diff --git a/README.md b/README.md
index 77b85e519..d81655758 100644
--- a/README.md
+++ b/README.md
@@ -1,22 +1,23 @@
# Go OpenAI
-[](https://pkg.go.dev/github.com/sashabaranov/go-openai)
-[](https://goreportcard.com/report/github.com/sashabaranov/go-openai)
-[](https://codecov.io/gh/sashabaranov/go-openai)
-This library provides unofficial Go clients for [OpenAI API](https://platform.openai.com/). We support:
+[](https://pkg.go.dev/github.com/incard/go-openai)
+[](https://goreportcard.com/report/github.com/incard/go-openai)
+[](https://codecov.io/gh/incard/go-openai)
-* ChatGPT 4o, o1
-* GPT-3, GPT-4
-* DALL·E 2, DALL·E 3, GPT Image 1
-* Whisper
+This library provides unofficial Go clients for [OpenAI API](https://platform.openai.com/). We support:
+
+- ChatGPT 4o, o1
+- GPT-3, GPT-4
+- DALL·E 2, DALL·E 3, GPT Image 1
+- Whisper
## Installation
```
-go get github.com/sashabaranov/go-openai
+go get github.com/incard/go-openai
```
-Currently, go-openai requires Go version 1.18 or greater.
+Currently, go-openai requires Go version 1.18 or greater.
## Usage
@@ -28,7 +29,7 @@ package main
import (
"context"
"fmt"
- openai "github.com/sashabaranov/go-openai"
+ openai "github.com/incard/go-openai"
)
func main() {
@@ -80,7 +81,7 @@ import (
"errors"
"fmt"
"io"
- openai "github.com/sashabaranov/go-openai"
+ openai "github.com/incard/go-openai"
)
func main() {
@@ -122,6 +123,7 @@ func main() {
}
}
```
+
@@ -133,7 +135,7 @@ package main
import (
"context"
"fmt"
- openai "github.com/sashabaranov/go-openai"
+ openai "github.com/incard/go-openai"
)
func main() {
@@ -153,6 +155,7 @@ func main() {
fmt.Println(resp.Choices[0].Text)
}
```
+
@@ -166,7 +169,7 @@ import (
"context"
"fmt"
"io"
- openai "github.com/sashabaranov/go-openai"
+ openai "github.com/incard/go-openai"
)
func main() {
@@ -203,6 +206,7 @@ func main() {
}
}
```
+
@@ -215,7 +219,7 @@ import (
"context"
"fmt"
- openai "github.com/sashabaranov/go-openai"
+ openai "github.com/incard/go-openai"
)
func main() {
@@ -234,6 +238,7 @@ func main() {
fmt.Println(resp.Text)
}
```
+
@@ -247,7 +252,7 @@ import (
"fmt"
"os"
- openai "github.com/sashabaranov/go-openai"
+ openai "github.com/incard/go-openai"
)
func main() {
@@ -275,6 +280,7 @@ func main() {
}
}
```
+
@@ -288,7 +294,7 @@ import (
"context"
"encoding/base64"
"fmt"
- openai "github.com/sashabaranov/go-openai"
+ openai "github.com/incard/go-openai"
"image/png"
"os"
)
@@ -355,6 +361,7 @@ func main() {
}
```
+
@@ -369,7 +376,7 @@ import (
"fmt"
"os"
- openai "github.com/sashabaranov/go-openai"
+ openai "github.com/incard/go-openai"
)
func main() {
@@ -415,6 +422,7 @@ func main() {
fmt.Printf("The image was saved as %s\n", outputPath)
}
```
+
@@ -436,7 +444,8 @@ config.HTTPClient = &http.Client{
c := openai.NewClientWithConfig(config)
```
-See also: https://pkg.go.dev/github.com/sashabaranov/go-openai#ClientConfig
+See also: https://pkg.go.dev/github.com/incard/go-openai#ClientConfig
+
@@ -452,7 +461,7 @@ import (
"os"
"strings"
- "github.com/sashabaranov/go-openai"
+ "github.com/incard/go-openai"
)
func main() {
@@ -494,6 +503,7 @@ func main() {
}
}
```
+
@@ -506,7 +516,7 @@ import (
"context"
"fmt"
- openai "github.com/sashabaranov/go-openai"
+ openai "github.com/incard/go-openai"
)
func main() {
@@ -541,6 +551,7 @@ func main() {
}
```
+
@@ -552,7 +563,7 @@ package main
import (
"context"
"log"
- openai "github.com/sashabaranov/go-openai"
+ openai "github.com/incard/go-openai"
)
@@ -597,6 +608,7 @@ func main() {
}
```
+
@@ -609,7 +621,7 @@ import (
"context"
"fmt"
- openai "github.com/sashabaranov/go-openai"
+ openai "github.com/incard/go-openai"
)
func main() {
@@ -645,6 +657,7 @@ func main() {
fmt.Println(vectors[:10], "...", vectors[len(vectors)-10:])
}
```
+
@@ -658,26 +671,21 @@ The developer documents give this JSON schema definition as an example:
```json
{
- "name":"get_current_weather",
- "description":"Get the current weather in a given location",
- "parameters":{
- "type":"object",
- "properties":{
- "location":{
- "type":"string",
- "description":"The city and state, e.g. San Francisco, CA"
- },
- "unit":{
- "type":"string",
- "enum":[
- "celsius",
- "fahrenheit"
- ]
- }
+ "name": "get_current_weather",
+ "description": "Get the current weather in a given location",
+ "parameters": {
+ "type": "object",
+ "properties": {
+ "location": {
+ "type": "string",
+ "description": "The city and state, e.g. San Francisco, CA"
+ },
+ "unit": {
+ "type": "string",
+ "enum": ["celsius", "fahrenheit"]
+ }
},
- "required":[
- "location"
- ]
+ "required": ["location"]
}
}
```
@@ -705,6 +713,7 @@ FunctionDefinition{
```
The `Parameters` field of a `FunctionDefinition` can accept either of the above styles, or even a nested struct from another library (as long as it can be marshalled into JSON).
+
@@ -713,6 +722,7 @@ The `Parameters` field of a `FunctionDefinition` can accept either of the above
Open-AI maintains clear documentation on how to [handle API errors](https://platform.openai.com/docs/guides/error-codes/api-errors)
example:
+
```
e := &openai.APIError{}
if errors.As(err, &e) {
@@ -720,7 +730,7 @@ if errors.As(err, &e) {
case 401:
// invalid auth or key (do not retry)
case 429:
- // rate limiting or engine overload (wait and retry)
+ // rate limiting or engine overload (wait and retry)
case 500:
// openai server error (retry)
default:
@@ -729,6 +739,7 @@ if errors.As(err, &e) {
}
```
+
@@ -740,7 +751,7 @@ package main
import (
"context"
"fmt"
- "github.com/sashabaranov/go-openai"
+ "github.com/incard/go-openai"
)
func main() {
@@ -802,6 +813,7 @@ func main() {
// fmt.Println(resp.Choices[0].Text)
}
```
+
@@ -815,8 +827,8 @@ import (
"fmt"
"log"
- "github.com/sashabaranov/go-openai"
- "github.com/sashabaranov/go-openai/jsonschema"
+ "github.com/incard/go-openai"
+ "github.com/incard/go-openai/jsonschema"
)
func main() {
@@ -866,6 +878,7 @@ func main() {
fmt.Println(result)
}
```
+
See the `examples/` folder for more.
@@ -881,6 +894,7 @@ Even when specifying a temperature field of 0, it doesn't guarantee that you'll
Due to the factors mentioned above, different answers may be returned even for the same question.
**Workarounds:**
+
1. As of November 2023, use [the new `seed` parameter](https://platform.openai.com/docs/guides/text-generation/reproducible-outputs) in conjunction with the `system_fingerprint` response field, alongside Temperature management.
2. Try using `math.SmallestNonzeroFloat32`: By specifying `math.SmallestNonzeroFloat32` in the temperature field instead of 0, you can mimic the behavior of setting it to 0.
3. Limiting Token Count: By limiting the number of tokens in the input and output and especially avoiding large requests close to 32k tokens, you can reduce the risk of non-deterministic behavior.
@@ -888,26 +902,28 @@ Due to the factors mentioned above, different answers may be returned even for t
By adopting these strategies, you can expect more consistent results.
**Related Issues:**
-[omitempty option of request struct will generate incorrect request when parameter is 0.](https://github.com/sashabaranov/go-openai/issues/9)
+[omitempty option of request struct will generate incorrect request when parameter is 0.](https://github.com/incard/go-openai/issues/9)
### Does Go OpenAI provide a method to count tokens?
No, Go OpenAI does not offer a feature to count tokens, and there are no plans to provide such a feature in the future. However, if there's a way to implement a token counting feature with zero dependencies, it might be possible to merge that feature into Go OpenAI. Otherwise, it would be more appropriate to implement it in a dedicated library or repository.
-For counting tokens, you might find the following links helpful:
+For counting tokens, you might find the following links helpful:
+
- [Counting Tokens For Chat API Calls](https://github.com/pkoukk/tiktoken-go#counting-tokens-for-chat-api-calls)
- [How to count tokens with tiktoken](https://github.com/openai/openai-cookbook/blob/main/examples/How_to_count_tokens_with_tiktoken.ipynb)
**Related Issues:**
-[Is it possible to join the implementation of GPT3 Tokenizer](https://github.com/sashabaranov/go-openai/issues/62)
+[Is it possible to join the implementation of GPT3 Tokenizer](https://github.com/incard/go-openai/issues/62)
## Contributing
-By following [Contributing Guidelines](https://github.com/sashabaranov/go-openai/blob/master/CONTRIBUTING.md), we hope to ensure that your contributions are made smoothly and efficiently.
+By following [Contributing Guidelines](https://github.com/incard/go-openai/blob/master/CONTRIBUTING.md), we hope to ensure that your contributions are made smoothly and efficiently.
## Thank you
-We want to take a moment to express our deepest gratitude to the [contributors](https://github.com/sashabaranov/go-openai/graphs/contributors) and sponsors of this project:
+We want to take a moment to express our deepest gratitude to the [contributors](https://github.com/incard/go-openai/graphs/contributors) and sponsors of this project:
+
- [Carson Kahn](https://carsonkahn.com) of [Spindle AI](https://spindleai.com)
To all of you: thank you. You've helped us achieve more than we ever imagined possible. Can't wait to see where we go next, together!
diff --git a/api_integration_test.go b/api_integration_test.go
index 7828d9451..b1b42b8d7 100644
--- a/api_integration_test.go
+++ b/api_integration_test.go
@@ -10,9 +10,9 @@ import (
"os"
"testing"
- "github.com/sashabaranov/go-openai"
- "github.com/sashabaranov/go-openai/internal/test/checks"
- "github.com/sashabaranov/go-openai/jsonschema"
+ "github.com/incard/go-openai"
+ "github.com/incard/go-openai/internal/test/checks"
+ "github.com/incard/go-openai/jsonschema"
)
func TestAPI(t *testing.T) {
diff --git a/assistant_test.go b/assistant_test.go
index 40de0e50f..a86be0d12 100644
--- a/assistant_test.go
+++ b/assistant_test.go
@@ -3,8 +3,8 @@ package openai_test
import (
"context"
- openai "github.com/sashabaranov/go-openai"
- "github.com/sashabaranov/go-openai/internal/test/checks"
+ openai "github.com/incard/go-openai"
+ "github.com/incard/go-openai/internal/test/checks"
"encoding/json"
"fmt"
diff --git a/audio.go b/audio.go
index f321f93d6..5ff0d2177 100644
--- a/audio.go
+++ b/audio.go
@@ -8,7 +8,7 @@ import (
"net/http"
"os"
- utils "github.com/sashabaranov/go-openai/internal"
+ utils "github.com/incard/go-openai/internal"
)
// Whisper Defines the models provided by OpenAI to use when processing audio with OpenAI.
diff --git a/audio_api_test.go b/audio_api_test.go
index 6c6a35643..a0c27ea73 100644
--- a/audio_api_test.go
+++ b/audio_api_test.go
@@ -12,9 +12,9 @@ import (
"strings"
"testing"
- "github.com/sashabaranov/go-openai"
- "github.com/sashabaranov/go-openai/internal/test"
- "github.com/sashabaranov/go-openai/internal/test/checks"
+ "github.com/incard/go-openai"
+ "github.com/incard/go-openai/internal/test"
+ "github.com/incard/go-openai/internal/test/checks"
)
// TestAudio Tests the transcription and translation endpoints of the API using the mocked server.
diff --git a/audio_test.go b/audio_test.go
index 51b3f465d..c952394cb 100644
--- a/audio_test.go
+++ b/audio_test.go
@@ -11,9 +11,9 @@ import (
"path/filepath"
"testing"
- utils "github.com/sashabaranov/go-openai/internal"
- "github.com/sashabaranov/go-openai/internal/test"
- "github.com/sashabaranov/go-openai/internal/test/checks"
+ utils "github.com/incard/go-openai/internal"
+ "github.com/incard/go-openai/internal/test"
+ "github.com/incard/go-openai/internal/test/checks"
)
func TestAudioWithFailingFormBuilder(t *testing.T) {
diff --git a/batch_test.go b/batch_test.go
index f4714f4eb..dfbfde717 100644
--- a/batch_test.go
+++ b/batch_test.go
@@ -7,8 +7,8 @@ import (
"reflect"
"testing"
- "github.com/sashabaranov/go-openai"
- "github.com/sashabaranov/go-openai/internal/test/checks"
+ "github.com/incard/go-openai"
+ "github.com/incard/go-openai/internal/test/checks"
)
func TestUploadBatchFile(t *testing.T) {
diff --git a/chat.go b/chat.go
index 0bb2e98ee..75fb939a4 100644
--- a/chat.go
+++ b/chat.go
@@ -6,7 +6,7 @@ import (
"errors"
"net/http"
- "github.com/sashabaranov/go-openai/jsonschema"
+ "github.com/incard/go-openai/jsonschema"
)
// Chat message role defined by the OpenAI API.
@@ -81,17 +81,25 @@ type ChatMessageImageURL struct {
Detail ImageURLDetail `json:"detail,omitempty"`
}
+type ChatMessageFile struct {
+ FileID string `json:"file_id,omitempty"`
+ FileName string `json:"file_name,omitempty"`
+ FileData string `json:"file_data,omitempty"`
+}
+
type ChatMessagePartType string
const (
ChatMessagePartTypeText ChatMessagePartType = "text"
ChatMessagePartTypeImageURL ChatMessagePartType = "image_url"
+ ChatMessagePartTypeFile ChatMessagePartType = "file"
)
type ChatMessagePart struct {
Type ChatMessagePartType `json:"type,omitempty"`
Text string `json:"text,omitempty"`
ImageURL *ChatMessageImageURL `json:"image_url,omitempty"`
+ File *ChatMessageFile `json:"file,omitempty"`
}
type ChatCompletionMessage struct {
diff --git a/chat_stream_test.go b/chat_stream_test.go
index eabb0f3a2..2da7340ae 100644
--- a/chat_stream_test.go
+++ b/chat_stream_test.go
@@ -10,8 +10,8 @@ import (
"strconv"
"testing"
- "github.com/sashabaranov/go-openai"
- "github.com/sashabaranov/go-openai/internal/test/checks"
+ "github.com/incard/go-openai"
+ "github.com/incard/go-openai/internal/test/checks"
)
func TestChatCompletionsStreamWrongModel(t *testing.T) {
diff --git a/chat_test.go b/chat_test.go
index 172ce0740..292193896 100644
--- a/chat_test.go
+++ b/chat_test.go
@@ -12,9 +12,9 @@ import (
"testing"
"time"
- "github.com/sashabaranov/go-openai"
- "github.com/sashabaranov/go-openai/internal/test/checks"
- "github.com/sashabaranov/go-openai/jsonschema"
+ "github.com/incard/go-openai"
+ "github.com/incard/go-openai/internal/test/checks"
+ "github.com/incard/go-openai/jsonschema"
)
const (
diff --git a/client.go b/client.go
index 413b8db03..84c1a3ab0 100644
--- a/client.go
+++ b/client.go
@@ -10,7 +10,7 @@ import (
"net/url"
"strings"
- utils "github.com/sashabaranov/go-openai/internal"
+ utils "github.com/incard/go-openai/internal"
)
// Client is OpenAI GPT-3 API client.
diff --git a/client_test.go b/client_test.go
index 321971445..7b944fcfb 100644
--- a/client_test.go
+++ b/client_test.go
@@ -10,8 +10,8 @@ import (
"reflect"
"testing"
- "github.com/sashabaranov/go-openai/internal/test"
- "github.com/sashabaranov/go-openai/internal/test/checks"
+ "github.com/incard/go-openai/internal/test"
+ "github.com/incard/go-openai/internal/test/checks"
)
var errTestRequestBuilderFailed = errors.New("test request builder failed")
diff --git a/completion_test.go b/completion_test.go
index f0ead0d63..05c9878bb 100644
--- a/completion_test.go
+++ b/completion_test.go
@@ -12,8 +12,8 @@ import (
"testing"
"time"
- "github.com/sashabaranov/go-openai"
- "github.com/sashabaranov/go-openai/internal/test/checks"
+ "github.com/incard/go-openai"
+ "github.com/incard/go-openai/internal/test/checks"
)
func TestCompletionsWrongModel(t *testing.T) {
diff --git a/config_test.go b/config_test.go
index 960230804..63fd6288b 100644
--- a/config_test.go
+++ b/config_test.go
@@ -3,7 +3,7 @@ package openai_test
import (
"testing"
- "github.com/sashabaranov/go-openai"
+ "github.com/incard/go-openai"
)
func TestGetAzureDeploymentByModel(t *testing.T) {
diff --git a/edits_test.go b/edits_test.go
index d2a6db40d..92c7082a4 100644
--- a/edits_test.go
+++ b/edits_test.go
@@ -9,8 +9,8 @@ import (
"testing"
"time"
- "github.com/sashabaranov/go-openai"
- "github.com/sashabaranov/go-openai/internal/test/checks"
+ "github.com/incard/go-openai"
+ "github.com/incard/go-openai/internal/test/checks"
)
// TestEdits Tests the edits endpoint of the API using the mocked server.
diff --git a/embeddings_test.go b/embeddings_test.go
index 07f1262cb..57539ce0e 100644
--- a/embeddings_test.go
+++ b/embeddings_test.go
@@ -11,8 +11,8 @@ import (
"reflect"
"testing"
- "github.com/sashabaranov/go-openai"
- "github.com/sashabaranov/go-openai/internal/test/checks"
+ "github.com/incard/go-openai"
+ "github.com/incard/go-openai/internal/test/checks"
)
func TestEmbedding(t *testing.T) {
diff --git a/engines_test.go b/engines_test.go
index d26aa5541..26d632bcc 100644
--- a/engines_test.go
+++ b/engines_test.go
@@ -7,8 +7,8 @@ import (
"net/http"
"testing"
- "github.com/sashabaranov/go-openai"
- "github.com/sashabaranov/go-openai/internal/test/checks"
+ "github.com/incard/go-openai"
+ "github.com/incard/go-openai/internal/test/checks"
)
// TestGetEngine Tests the retrieve engine endpoint of the API using the mocked server.
diff --git a/error.go b/error.go
index 8a74bd52c..02c3fa53c 100644
--- a/error.go
+++ b/error.go
@@ -54,7 +54,7 @@ func (e *APIError) UnmarshalJSON(data []byte) (err error) {
err = json.Unmarshal(rawMap["message"], &e.Message)
if err != nil {
// If the parameter field of a function call is invalid as a JSON schema
- // refs: https://github.com/sashabaranov/go-openai/issues/381
+ // refs: https://github.com/incard/go-openai/issues/381
var messages []string
err = json.Unmarshal(rawMap["message"], &messages)
if err != nil {
@@ -64,7 +64,7 @@ func (e *APIError) UnmarshalJSON(data []byte) (err error) {
}
// optional fields for azure openai
- // refs: https://github.com/sashabaranov/go-openai/issues/343
+ // refs: https://github.com/incard/go-openai/issues/343
if _, ok := rawMap["type"]; ok {
err = json.Unmarshal(rawMap["type"], &e.Type)
if err != nil {
diff --git a/error_test.go b/error_test.go
index 48cbe4f29..9703878e2 100644
--- a/error_test.go
+++ b/error_test.go
@@ -6,7 +6,7 @@ import (
"reflect"
"testing"
- "github.com/sashabaranov/go-openai"
+ "github.com/incard/go-openai"
)
func TestAPIErrorUnmarshalJSON(t *testing.T) {
diff --git a/example_test.go b/example_test.go
index 5910ffb84..f92727135 100644
--- a/example_test.go
+++ b/example_test.go
@@ -11,7 +11,7 @@ import (
"net/url"
"os"
- "github.com/sashabaranov/go-openai"
+ "github.com/incard/go-openai"
)
func Example() {
diff --git a/examples/chatbot/main.go b/examples/chatbot/main.go
index ad41e957d..44b5f4a71 100644
--- a/examples/chatbot/main.go
+++ b/examples/chatbot/main.go
@@ -6,7 +6,7 @@ import (
"fmt"
"os"
- "github.com/sashabaranov/go-openai"
+ "github.com/incard/go-openai"
)
func main() {
diff --git a/examples/completion-with-tool/main.go b/examples/completion-with-tool/main.go
index 26126e41b..7a7576e31 100644
--- a/examples/completion-with-tool/main.go
+++ b/examples/completion-with-tool/main.go
@@ -5,8 +5,8 @@ import (
"fmt"
"os"
- "github.com/sashabaranov/go-openai"
- "github.com/sashabaranov/go-openai/jsonschema"
+ "github.com/incard/go-openai"
+ "github.com/incard/go-openai/jsonschema"
)
func main() {
diff --git a/examples/completion/main.go b/examples/completion/main.go
index 8c5cbd5ca..a1e0a4220 100644
--- a/examples/completion/main.go
+++ b/examples/completion/main.go
@@ -5,7 +5,7 @@ import (
"fmt"
"os"
- "github.com/sashabaranov/go-openai"
+ "github.com/incard/go-openai"
)
func main() {
diff --git a/examples/images/main.go b/examples/images/main.go
index 5ee649d22..e0f57f7c6 100644
--- a/examples/images/main.go
+++ b/examples/images/main.go
@@ -5,7 +5,7 @@ import (
"fmt"
"os"
- "github.com/sashabaranov/go-openai"
+ "github.com/incard/go-openai"
)
func main() {
diff --git a/examples/voice-to-text/main.go b/examples/voice-to-text/main.go
index 713e748e1..ad4246545 100644
--- a/examples/voice-to-text/main.go
+++ b/examples/voice-to-text/main.go
@@ -6,7 +6,7 @@ import (
"fmt"
"os"
- "github.com/sashabaranov/go-openai"
+ "github.com/incard/go-openai"
)
func main() {
diff --git a/files_api_test.go b/files_api_test.go
index aa4fda458..d786104b5 100644
--- a/files_api_test.go
+++ b/files_api_test.go
@@ -12,8 +12,8 @@ import (
"testing"
"time"
- "github.com/sashabaranov/go-openai"
- "github.com/sashabaranov/go-openai/internal/test/checks"
+ "github.com/incard/go-openai"
+ "github.com/incard/go-openai/internal/test/checks"
)
func TestFileBytesUpload(t *testing.T) {
diff --git a/files_test.go b/files_test.go
index 486ef892e..d38a01482 100644
--- a/files_test.go
+++ b/files_test.go
@@ -7,8 +7,8 @@ import (
"os"
"testing"
- utils "github.com/sashabaranov/go-openai/internal"
- "github.com/sashabaranov/go-openai/internal/test/checks"
+ utils "github.com/incard/go-openai/internal"
+ "github.com/incard/go-openai/internal/test/checks"
)
func TestFileBytesUploadWithFailingFormBuilder(t *testing.T) {
diff --git a/fine_tunes_test.go b/fine_tunes_test.go
index 2ab6817f7..ba935dfff 100644
--- a/fine_tunes_test.go
+++ b/fine_tunes_test.go
@@ -7,8 +7,8 @@ import (
"net/http"
"testing"
- "github.com/sashabaranov/go-openai"
- "github.com/sashabaranov/go-openai/internal/test/checks"
+ "github.com/incard/go-openai"
+ "github.com/incard/go-openai/internal/test/checks"
)
const testFineTuneID = "fine-tune-id"
diff --git a/fine_tuning_job_test.go b/fine_tuning_job_test.go
index 5f63ef24c..48496725e 100644
--- a/fine_tuning_job_test.go
+++ b/fine_tuning_job_test.go
@@ -7,8 +7,8 @@ import (
"net/http"
"testing"
- "github.com/sashabaranov/go-openai"
- "github.com/sashabaranov/go-openai/internal/test/checks"
+ "github.com/incard/go-openai"
+ "github.com/incard/go-openai/internal/test/checks"
)
const testFineTuninigJobID = "fine-tuning-job-id"
diff --git a/go.mod b/go.mod
index 42cc7b391..fcba36af7 100644
--- a/go.mod
+++ b/go.mod
@@ -1,3 +1,3 @@
-module github.com/sashabaranov/go-openai
+module github.com/incard/go-openai
go 1.18
diff --git a/image_api_test.go b/image_api_test.go
index f6057b77d..e704e6a52 100644
--- a/image_api_test.go
+++ b/image_api_test.go
@@ -11,8 +11,8 @@ import (
"testing"
"time"
- "github.com/sashabaranov/go-openai"
- "github.com/sashabaranov/go-openai/internal/test/checks"
+ "github.com/incard/go-openai"
+ "github.com/incard/go-openai/internal/test/checks"
)
func TestImages(t *testing.T) {
diff --git a/image_test.go b/image_test.go
index c2c8f42dc..24492b12b 100644
--- a/image_test.go
+++ b/image_test.go
@@ -1,8 +1,8 @@
package openai //nolint:testpackage // testing private field
import (
- utils "github.com/sashabaranov/go-openai/internal"
- "github.com/sashabaranov/go-openai/internal/test/checks"
+ utils "github.com/incard/go-openai/internal"
+ "github.com/incard/go-openai/internal/test/checks"
"bytes"
"context"
diff --git a/internal/error_accumulator_test.go b/internal/error_accumulator_test.go
index f6c226c5e..1f0958637 100644
--- a/internal/error_accumulator_test.go
+++ b/internal/error_accumulator_test.go
@@ -3,9 +3,9 @@ package openai_test
import (
"testing"
- openai "github.com/sashabaranov/go-openai/internal"
- "github.com/sashabaranov/go-openai/internal/test"
- "github.com/sashabaranov/go-openai/internal/test/checks"
+ openai "github.com/incard/go-openai/internal"
+ "github.com/incard/go-openai/internal/test"
+ "github.com/incard/go-openai/internal/test/checks"
)
func TestDefaultErrorAccumulator_WriteMultiple(t *testing.T) {
diff --git a/internal/form_builder_test.go b/internal/form_builder_test.go
index 53ef11d23..d3d2ffd1e 100644
--- a/internal/form_builder_test.go
+++ b/internal/form_builder_test.go
@@ -4,7 +4,7 @@ import (
"errors"
"io"
- "github.com/sashabaranov/go-openai/internal/test/checks"
+ "github.com/incard/go-openai/internal/test/checks"
"bytes"
"os"
diff --git a/internal/marshaller_test.go b/internal/marshaller_test.go
index 70694faed..a6644d2a9 100644
--- a/internal/marshaller_test.go
+++ b/internal/marshaller_test.go
@@ -3,8 +3,8 @@ package openai_test
import (
"testing"
- openai "github.com/sashabaranov/go-openai/internal"
- "github.com/sashabaranov/go-openai/internal/test/checks"
+ openai "github.com/incard/go-openai/internal"
+ "github.com/incard/go-openai/internal/test/checks"
)
func TestJSONMarshaller_Normal(t *testing.T) {
diff --git a/internal/test/checks/checks_test.go b/internal/test/checks/checks_test.go
index 0677054df..8ec9a6b43 100644
--- a/internal/test/checks/checks_test.go
+++ b/internal/test/checks/checks_test.go
@@ -4,7 +4,7 @@ import (
"errors"
"testing"
- "github.com/sashabaranov/go-openai/internal/test/checks"
+ "github.com/incard/go-openai/internal/test/checks"
)
func TestChecksSuccessPaths(t *testing.T) {
diff --git a/internal/test/helpers.go b/internal/test/helpers.go
index dc5fa6646..739699814 100644
--- a/internal/test/helpers.go
+++ b/internal/test/helpers.go
@@ -1,7 +1,7 @@
package test
import (
- "github.com/sashabaranov/go-openai/internal/test/checks"
+ "github.com/incard/go-openai/internal/test/checks"
"net/http"
"os"
diff --git a/internal/test/helpers_test.go b/internal/test/helpers_test.go
index aa177679b..16461b757 100644
--- a/internal/test/helpers_test.go
+++ b/internal/test/helpers_test.go
@@ -8,7 +8,7 @@ import (
"path/filepath"
"testing"
- internaltest "github.com/sashabaranov/go-openai/internal/test"
+ internaltest "github.com/incard/go-openai/internal/test"
)
func TestCreateTestFile(t *testing.T) {
diff --git a/internal/test/server_test.go b/internal/test/server_test.go
index f8ce731d1..6d0089e82 100644
--- a/internal/test/server_test.go
+++ b/internal/test/server_test.go
@@ -5,7 +5,7 @@ import (
"net/http"
"testing"
- internaltest "github.com/sashabaranov/go-openai/internal/test"
+ internaltest "github.com/incard/go-openai/internal/test"
)
func TestGetTestToken(t *testing.T) {
diff --git a/internal/unmarshaler_test.go b/internal/unmarshaler_test.go
index d63eac779..9a1c97d84 100644
--- a/internal/unmarshaler_test.go
+++ b/internal/unmarshaler_test.go
@@ -3,8 +3,8 @@ package openai_test
import (
"testing"
- openai "github.com/sashabaranov/go-openai/internal"
- "github.com/sashabaranov/go-openai/internal/test/checks"
+ openai "github.com/incard/go-openai/internal"
+ "github.com/incard/go-openai/internal/test/checks"
)
func TestJSONUnmarshaler_Normal(t *testing.T) {
diff --git a/jsonschema/containsref_test.go b/jsonschema/containsref_test.go
index dc1842775..f6170c5f4 100644
--- a/jsonschema/containsref_test.go
+++ b/jsonschema/containsref_test.go
@@ -3,7 +3,7 @@ package jsonschema_test
import (
"testing"
- "github.com/sashabaranov/go-openai/jsonschema"
+ "github.com/incard/go-openai/jsonschema"
)
// SelfRef struct used to produce a self-referential schema.
diff --git a/jsonschema/json_additional_test.go b/jsonschema/json_additional_test.go
index 70cf37490..ec3b0d7f5 100644
--- a/jsonschema/json_additional_test.go
+++ b/jsonschema/json_additional_test.go
@@ -3,7 +3,7 @@ package jsonschema_test
import (
"testing"
- "github.com/sashabaranov/go-openai/jsonschema"
+ "github.com/incard/go-openai/jsonschema"
)
// Test Definition.Unmarshal, including success path, validation error,
diff --git a/jsonschema/json_errors_test.go b/jsonschema/json_errors_test.go
index 3b864fc21..a2235e76b 100644
--- a/jsonschema/json_errors_test.go
+++ b/jsonschema/json_errors_test.go
@@ -3,7 +3,7 @@ package jsonschema_test
import (
"testing"
- "github.com/sashabaranov/go-openai/jsonschema"
+ "github.com/incard/go-openai/jsonschema"
)
// TestGenerateSchemaForType_ErrorPaths verifies error handling for unsupported types.
diff --git a/jsonschema/json_test.go b/jsonschema/json_test.go
index 34f5d88eb..bd8f3e1f0 100644
--- a/jsonschema/json_test.go
+++ b/jsonschema/json_test.go
@@ -5,7 +5,7 @@ import (
"reflect"
"testing"
- "github.com/sashabaranov/go-openai/jsonschema"
+ "github.com/incard/go-openai/jsonschema"
)
func TestDefinition_MarshalJSON(t *testing.T) {
diff --git a/jsonschema/validate_test.go b/jsonschema/validate_test.go
index aefdf4069..66a00bd7a 100644
--- a/jsonschema/validate_test.go
+++ b/jsonschema/validate_test.go
@@ -4,7 +4,7 @@ import (
"reflect"
"testing"
- "github.com/sashabaranov/go-openai/jsonschema"
+ "github.com/incard/go-openai/jsonschema"
)
func Test_Validate(t *testing.T) {
diff --git a/messages_test.go b/messages_test.go
index b25755f98..0fa48b2fd 100644
--- a/messages_test.go
+++ b/messages_test.go
@@ -7,9 +7,9 @@ import (
"net/http"
"testing"
- "github.com/sashabaranov/go-openai"
- "github.com/sashabaranov/go-openai/internal/test"
- "github.com/sashabaranov/go-openai/internal/test/checks"
+ "github.com/incard/go-openai"
+ "github.com/incard/go-openai/internal/test"
+ "github.com/incard/go-openai/internal/test/checks"
)
var emptyStr = ""
diff --git a/models_test.go b/models_test.go
index 7fd010c34..8c7f7054f 100644
--- a/models_test.go
+++ b/models_test.go
@@ -9,8 +9,8 @@ import (
"testing"
"time"
- "github.com/sashabaranov/go-openai"
- "github.com/sashabaranov/go-openai/internal/test/checks"
+ "github.com/incard/go-openai"
+ "github.com/incard/go-openai/internal/test/checks"
)
const testFineTuneModelID = "fine-tune-model-id"
diff --git a/moderation_test.go b/moderation_test.go
index a97f25bc6..d50344485 100644
--- a/moderation_test.go
+++ b/moderation_test.go
@@ -11,8 +11,8 @@ import (
"testing"
"time"
- "github.com/sashabaranov/go-openai"
- "github.com/sashabaranov/go-openai/internal/test/checks"
+ "github.com/incard/go-openai"
+ "github.com/incard/go-openai/internal/test/checks"
)
// TestModeration Tests the moderations endpoint of the API using the mocked server.
diff --git a/openai_test.go b/openai_test.go
index a55f3a858..92531e944 100644
--- a/openai_test.go
+++ b/openai_test.go
@@ -1,8 +1,8 @@
package openai_test
import (
- "github.com/sashabaranov/go-openai"
- "github.com/sashabaranov/go-openai/internal/test"
+ "github.com/incard/go-openai"
+ "github.com/incard/go-openai/internal/test"
)
func setupOpenAITestServer() (client *openai.Client, server *test.ServerTest, teardown func()) {
diff --git a/run_test.go b/run_test.go
index cdf99db05..1a4f5c57d 100644
--- a/run_test.go
+++ b/run_test.go
@@ -3,8 +3,8 @@ package openai_test
import (
"context"
- openai "github.com/sashabaranov/go-openai"
- "github.com/sashabaranov/go-openai/internal/test/checks"
+ openai "github.com/incard/go-openai"
+ "github.com/incard/go-openai/internal/test/checks"
"encoding/json"
"fmt"
diff --git a/speech_test.go b/speech_test.go
index 67a3feabc..9dc28154a 100644
--- a/speech_test.go
+++ b/speech_test.go
@@ -11,9 +11,9 @@ import (
"path/filepath"
"testing"
- "github.com/sashabaranov/go-openai"
- "github.com/sashabaranov/go-openai/internal/test"
- "github.com/sashabaranov/go-openai/internal/test/checks"
+ "github.com/incard/go-openai"
+ "github.com/incard/go-openai/internal/test"
+ "github.com/incard/go-openai/internal/test/checks"
)
func TestSpeechIntegration(t *testing.T) {
diff --git a/stream_reader.go b/stream_reader.go
index 6faefe0a7..2c922dc32 100644
--- a/stream_reader.go
+++ b/stream_reader.go
@@ -8,7 +8,7 @@ import (
"net/http"
"regexp"
- utils "github.com/sashabaranov/go-openai/internal"
+ utils "github.com/incard/go-openai/internal"
)
var (
diff --git a/stream_reader_test.go b/stream_reader_test.go
index 449a14b43..aace040a7 100644
--- a/stream_reader_test.go
+++ b/stream_reader_test.go
@@ -6,9 +6,9 @@ import (
"errors"
"testing"
- utils "github.com/sashabaranov/go-openai/internal"
- "github.com/sashabaranov/go-openai/internal/test"
- "github.com/sashabaranov/go-openai/internal/test/checks"
+ utils "github.com/incard/go-openai/internal"
+ "github.com/incard/go-openai/internal/test"
+ "github.com/incard/go-openai/internal/test/checks"
)
var errTestUnmarshalerFailed = errors.New("test unmarshaler failed")
diff --git a/stream_test.go b/stream_test.go
index 9dd95bb5f..e348fc0e4 100644
--- a/stream_test.go
+++ b/stream_test.go
@@ -10,8 +10,8 @@ import (
"testing"
"time"
- "github.com/sashabaranov/go-openai"
- "github.com/sashabaranov/go-openai/internal/test/checks"
+ "github.com/incard/go-openai"
+ "github.com/incard/go-openai/internal/test/checks"
)
func TestCompletionsStreamWrongModel(t *testing.T) {
diff --git a/thread_test.go b/thread_test.go
index 1ac0f3c0e..7c9e479a9 100644
--- a/thread_test.go
+++ b/thread_test.go
@@ -7,8 +7,8 @@ import (
"net/http"
"testing"
- openai "github.com/sashabaranov/go-openai"
- "github.com/sashabaranov/go-openai/internal/test/checks"
+ openai "github.com/incard/go-openai"
+ "github.com/incard/go-openai/internal/test/checks"
)
// TestThread Tests the thread endpoint of the API using the mocked server.
diff --git a/vector_store_test.go b/vector_store_test.go
index 58b9a857e..88ece4257 100644
--- a/vector_store_test.go
+++ b/vector_store_test.go
@@ -3,8 +3,8 @@ package openai_test
import (
"context"
- openai "github.com/sashabaranov/go-openai"
- "github.com/sashabaranov/go-openai/internal/test/checks"
+ openai "github.com/incard/go-openai"
+ "github.com/incard/go-openai/internal/test/checks"
"encoding/json"
"fmt"