feat: change repo name

This commit is contained in:
VaalaCat
2025-02-12 13:22:09 +00:00
parent a62919e8c6
commit 40de0deb41
51 changed files with 114 additions and 114 deletions

View File

@@ -8,7 +8,7 @@ assignees: ''
--- ---
Your issue may already be reported! 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://git.vaala.cloud/VaalaCat/go-openai/issues) before creating one.
**Describe the bug** **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). A clear and concise description of what the bug is. If it's an API-related bug, please provide relevant endpoint(s).

View File

@@ -8,7 +8,7 @@ assignees: ''
--- ---
Your issue may already be reported! 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://git.vaala.cloud/VaalaCat/go-openai/issues) before creating one.
**Is your feature request related to a problem? Please describe.** **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 [...] A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

View File

@@ -1,5 +1,5 @@
A similar PR may already be submitted! 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://git.vaala.cloud/VaalaCat/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. 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.

View File

@@ -1,22 +1,22 @@
# Contributing Guidelines # Contributing Guidelines
## Overview ## 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://git.vaala.cloud/VaalaCat/go-openai/blob/master/LICENSE), and we welcome contributions through GitHub pull requests.
## Reporting Bugs ## 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://git.vaala.cloud/VaalaCat/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 ## 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://git.vaala.cloud/VaalaCat/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 ## 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://git.vaala.cloud/VaalaCat/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 ## 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://git.vaala.cloud/VaalaCat/go-openai/discussions).
## Contributing Code ## 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://git.vaala.cloud/VaalaCat/go-openai/pulls) before creating one.
### Requirements for Merging a Pull Request ### Requirements for Merging a Pull Request

View File

@@ -1,6 +1,6 @@
# Go OpenAI # Go OpenAI
[![Go Reference](https://pkg.go.dev/badge/github.com/sashabaranov/go-openai.svg)](https://pkg.go.dev/github.com/sashabaranov/go-openai) [![Go Reference](https://pkg.go.dev/badge/git.vaala.cloud/VaalaCat/go-openai.svg)](https://pkg.go.dev/git.vaala.cloud/VaalaCat/go-openai)
[![Go Report Card](https://goreportcard.com/badge/github.com/sashabaranov/go-openai)](https://goreportcard.com/report/github.com/sashabaranov/go-openai) [![Go Report Card](https://goreportcard.com/badge/git.vaala.cloud/VaalaCat/go-openai)](https://goreportcard.com/report/git.vaala.cloud/VaalaCat/go-openai)
[![codecov](https://codecov.io/gh/sashabaranov/go-openai/branch/master/graph/badge.svg?token=bCbIfHLIsW)](https://codecov.io/gh/sashabaranov/go-openai) [![codecov](https://codecov.io/gh/sashabaranov/go-openai/branch/master/graph/badge.svg?token=bCbIfHLIsW)](https://codecov.io/gh/sashabaranov/go-openai)
This library provides unofficial Go clients for [OpenAI API](https://platform.openai.com/). We support: This library provides unofficial Go clients for [OpenAI API](https://platform.openai.com/). We support:
@@ -13,7 +13,7 @@ This library provides unofficial Go clients for [OpenAI API](https://platform.op
## Installation ## Installation
``` ```
go get github.com/sashabaranov/go-openai go get git.vaala.cloud/VaalaCat/go-openai
``` ```
Currently, go-openai requires Go version 1.18 or greater. Currently, go-openai requires Go version 1.18 or greater.
@@ -28,7 +28,7 @@ package main
import ( import (
"context" "context"
"fmt" "fmt"
openai "github.com/sashabaranov/go-openai" openai "git.vaala.cloud/VaalaCat/go-openai"
) )
func main() { func main() {
@@ -80,7 +80,7 @@ import (
"errors" "errors"
"fmt" "fmt"
"io" "io"
openai "github.com/sashabaranov/go-openai" openai "git.vaala.cloud/VaalaCat/go-openai"
) )
func main() { func main() {
@@ -133,7 +133,7 @@ package main
import ( import (
"context" "context"
"fmt" "fmt"
openai "github.com/sashabaranov/go-openai" openai "git.vaala.cloud/VaalaCat/go-openai"
) )
func main() { func main() {
@@ -166,7 +166,7 @@ import (
"context" "context"
"fmt" "fmt"
"io" "io"
openai "github.com/sashabaranov/go-openai" openai "git.vaala.cloud/VaalaCat/go-openai"
) )
func main() { func main() {
@@ -215,7 +215,7 @@ import (
"context" "context"
"fmt" "fmt"
openai "github.com/sashabaranov/go-openai" openai "git.vaala.cloud/VaalaCat/go-openai"
) )
func main() { func main() {
@@ -247,7 +247,7 @@ import (
"fmt" "fmt"
"os" "os"
openai "github.com/sashabaranov/go-openai" openai "git.vaala.cloud/VaalaCat/go-openai"
) )
func main() { func main() {
@@ -288,7 +288,7 @@ import (
"context" "context"
"encoding/base64" "encoding/base64"
"fmt" "fmt"
openai "github.com/sashabaranov/go-openai" openai "git.vaala.cloud/VaalaCat/go-openai"
"image/png" "image/png"
"os" "os"
) )
@@ -376,7 +376,7 @@ config.HTTPClient = &http.Client{
c := openai.NewClientWithConfig(config) c := openai.NewClientWithConfig(config)
``` ```
See also: https://pkg.go.dev/github.com/sashabaranov/go-openai#ClientConfig See also: https://pkg.go.dev/git.vaala.cloud/VaalaCat/go-openai#ClientConfig
</details> </details>
<details> <details>
@@ -392,7 +392,7 @@ import (
"os" "os"
"strings" "strings"
"github.com/sashabaranov/go-openai" "git.vaala.cloud/VaalaCat/go-openai"
) )
func main() { func main() {
@@ -446,7 +446,7 @@ import (
"context" "context"
"fmt" "fmt"
openai "github.com/sashabaranov/go-openai" openai "git.vaala.cloud/VaalaCat/go-openai"
) )
func main() { func main() {
@@ -492,7 +492,7 @@ package main
import ( import (
"context" "context"
"log" "log"
openai "github.com/sashabaranov/go-openai" openai "git.vaala.cloud/VaalaCat/go-openai"
) )
@@ -549,7 +549,7 @@ import (
"context" "context"
"fmt" "fmt"
openai "github.com/sashabaranov/go-openai" openai "git.vaala.cloud/VaalaCat/go-openai"
) )
func main() { func main() {
@@ -680,7 +680,7 @@ package main
import ( import (
"context" "context"
"fmt" "fmt"
"github.com/sashabaranov/go-openai" "git.vaala.cloud/VaalaCat/go-openai"
) )
func main() { func main() {
@@ -755,8 +755,8 @@ import (
"fmt" "fmt"
"log" "log"
"github.com/sashabaranov/go-openai" "git.vaala.cloud/VaalaCat/go-openai"
"github.com/sashabaranov/go-openai/jsonschema" "git.vaala.cloud/VaalaCat/go-openai/jsonschema"
) )
func main() { func main() {
@@ -828,7 +828,7 @@ Due to the factors mentioned above, different answers may be returned even for t
By adopting these strategies, you can expect more consistent results. By adopting these strategies, you can expect more consistent results.
**Related Issues:** **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://git.vaala.cloud/VaalaCat/go-openai/issues/9)
### Does Go OpenAI provide a method to count tokens? ### Does Go OpenAI provide a method to count tokens?
@@ -839,15 +839,15 @@ For counting tokens, you might find the following links helpful:
- [How to count tokens with tiktoken](https://github.com/openai/openai-cookbook/blob/main/examples/How_to_count_tokens_with_tiktoken.ipynb) - [How to count tokens with tiktoken](https://github.com/openai/openai-cookbook/blob/main/examples/How_to_count_tokens_with_tiktoken.ipynb)
**Related Issues:** **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://git.vaala.cloud/VaalaCat/go-openai/issues/62)
## Contributing ## 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://git.vaala.cloud/VaalaCat/go-openai/blob/master/CONTRIBUTING.md), we hope to ensure that your contributions are made smoothly and efficiently.
## Thank you ## 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://git.vaala.cloud/VaalaCat/go-openai/graphs/contributors) and sponsors of this project:
- [Carson Kahn](https://carsonkahn.com) of [Spindle AI](https://spindleai.com) - [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! 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!

View File

@@ -10,9 +10,9 @@ import (
"os" "os"
"testing" "testing"
"github.com/sashabaranov/go-openai" "git.vaala.cloud/VaalaCat/go-openai"
"github.com/sashabaranov/go-openai/internal/test/checks" "git.vaala.cloud/VaalaCat/go-openai/internal/test/checks"
"github.com/sashabaranov/go-openai/jsonschema" "git.vaala.cloud/VaalaCat/go-openai/jsonschema"
) )
func TestAPI(t *testing.T) { func TestAPI(t *testing.T) {

View File

@@ -3,8 +3,8 @@ package openai_test
import ( import (
"context" "context"
openai "github.com/sashabaranov/go-openai" openai "git.vaala.cloud/VaalaCat/go-openai"
"github.com/sashabaranov/go-openai/internal/test/checks" "git.vaala.cloud/VaalaCat/go-openai/internal/test/checks"
"encoding/json" "encoding/json"
"fmt" "fmt"

View File

@@ -8,7 +8,7 @@ import (
"net/http" "net/http"
"os" "os"
utils "github.com/sashabaranov/go-openai/internal" utils "git.vaala.cloud/VaalaCat/go-openai/internal"
) )
// Whisper Defines the models provided by OpenAI to use when processing audio with OpenAI. // Whisper Defines the models provided by OpenAI to use when processing audio with OpenAI.

View File

@@ -12,9 +12,9 @@ import (
"strings" "strings"
"testing" "testing"
"github.com/sashabaranov/go-openai" "git.vaala.cloud/VaalaCat/go-openai"
"github.com/sashabaranov/go-openai/internal/test" "git.vaala.cloud/VaalaCat/go-openai/internal/test"
"github.com/sashabaranov/go-openai/internal/test/checks" "git.vaala.cloud/VaalaCat/go-openai/internal/test/checks"
) )
// TestAudio Tests the transcription and translation endpoints of the API using the mocked server. // TestAudio Tests the transcription and translation endpoints of the API using the mocked server.

View File

@@ -8,8 +8,8 @@ import (
"path/filepath" "path/filepath"
"testing" "testing"
"github.com/sashabaranov/go-openai/internal/test" "git.vaala.cloud/VaalaCat/go-openai/internal/test"
"github.com/sashabaranov/go-openai/internal/test/checks" "git.vaala.cloud/VaalaCat/go-openai/internal/test/checks"
) )
func TestAudioWithFailingFormBuilder(t *testing.T) { func TestAudioWithFailingFormBuilder(t *testing.T) {

View File

@@ -7,8 +7,8 @@ import (
"reflect" "reflect"
"testing" "testing"
"github.com/sashabaranov/go-openai" "git.vaala.cloud/VaalaCat/go-openai"
"github.com/sashabaranov/go-openai/internal/test/checks" "git.vaala.cloud/VaalaCat/go-openai/internal/test/checks"
) )
func TestUploadBatchFile(t *testing.T) { func TestUploadBatchFile(t *testing.T) {

View File

@@ -10,8 +10,8 @@ import (
"strconv" "strconv"
"testing" "testing"
"github.com/sashabaranov/go-openai" "git.vaala.cloud/VaalaCat/go-openai"
"github.com/sashabaranov/go-openai/internal/test/checks" "git.vaala.cloud/VaalaCat/go-openai/internal/test/checks"
) )
func TestChatCompletionsStreamWrongModel(t *testing.T) { func TestChatCompletionsStreamWrongModel(t *testing.T) {

View File

@@ -12,9 +12,9 @@ import (
"testing" "testing"
"time" "time"
"github.com/sashabaranov/go-openai" "git.vaala.cloud/VaalaCat/go-openai"
"github.com/sashabaranov/go-openai/internal/test/checks" "git.vaala.cloud/VaalaCat/go-openai/internal/test/checks"
"github.com/sashabaranov/go-openai/jsonschema" "git.vaala.cloud/VaalaCat/go-openai/jsonschema"
) )
const ( const (

View File

@@ -10,7 +10,7 @@ import (
"net/url" "net/url"
"strings" "strings"
utils "github.com/sashabaranov/go-openai/internal" utils "git.vaala.cloud/VaalaCat/go-openai/internal"
) )
// Client is OpenAI GPT-3 API client. // Client is OpenAI GPT-3 API client.

View File

@@ -10,8 +10,8 @@ import (
"reflect" "reflect"
"testing" "testing"
"github.com/sashabaranov/go-openai/internal/test" "git.vaala.cloud/VaalaCat/go-openai/internal/test"
"github.com/sashabaranov/go-openai/internal/test/checks" "git.vaala.cloud/VaalaCat/go-openai/internal/test/checks"
) )
var errTestRequestBuilderFailed = errors.New("test request builder failed") var errTestRequestBuilderFailed = errors.New("test request builder failed")

View File

@@ -12,8 +12,8 @@ import (
"testing" "testing"
"time" "time"
"github.com/sashabaranov/go-openai" "git.vaala.cloud/VaalaCat/go-openai"
"github.com/sashabaranov/go-openai/internal/test/checks" "git.vaala.cloud/VaalaCat/go-openai/internal/test/checks"
) )
func TestCompletionsWrongModel(t *testing.T) { func TestCompletionsWrongModel(t *testing.T) {

View File

@@ -3,7 +3,7 @@ package openai_test
import ( import (
"testing" "testing"
"github.com/sashabaranov/go-openai" "git.vaala.cloud/VaalaCat/go-openai"
) )
func TestGetAzureDeploymentByModel(t *testing.T) { func TestGetAzureDeploymentByModel(t *testing.T) {

View File

@@ -9,8 +9,8 @@ import (
"testing" "testing"
"time" "time"
"github.com/sashabaranov/go-openai" "git.vaala.cloud/VaalaCat/go-openai"
"github.com/sashabaranov/go-openai/internal/test/checks" "git.vaala.cloud/VaalaCat/go-openai/internal/test/checks"
) )
// TestEdits Tests the edits endpoint of the API using the mocked server. // TestEdits Tests the edits endpoint of the API using the mocked server.

View File

@@ -11,8 +11,8 @@ import (
"reflect" "reflect"
"testing" "testing"
"github.com/sashabaranov/go-openai" "git.vaala.cloud/VaalaCat/go-openai"
"github.com/sashabaranov/go-openai/internal/test/checks" "git.vaala.cloud/VaalaCat/go-openai/internal/test/checks"
) )
func TestEmbedding(t *testing.T) { func TestEmbedding(t *testing.T) {

View File

@@ -7,8 +7,8 @@ import (
"net/http" "net/http"
"testing" "testing"
"github.com/sashabaranov/go-openai" "git.vaala.cloud/VaalaCat/go-openai"
"github.com/sashabaranov/go-openai/internal/test/checks" "git.vaala.cloud/VaalaCat/go-openai/internal/test/checks"
) )
// TestGetEngine Tests the retrieve engine endpoint of the API using the mocked server. // TestGetEngine Tests the retrieve engine endpoint of the API using the mocked server.

View File

@@ -54,7 +54,7 @@ func (e *APIError) UnmarshalJSON(data []byte) (err error) {
err = json.Unmarshal(rawMap["message"], &e.Message) err = json.Unmarshal(rawMap["message"], &e.Message)
if err != nil { if err != nil {
// If the parameter field of a function call is invalid as a JSON schema // 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://git.vaala.cloud/VaalaCat/go-openai/issues/381
var messages []string var messages []string
err = json.Unmarshal(rawMap["message"], &messages) err = json.Unmarshal(rawMap["message"], &messages)
if err != nil { if err != nil {
@@ -64,7 +64,7 @@ func (e *APIError) UnmarshalJSON(data []byte) (err error) {
} }
// optional fields for azure openai // optional fields for azure openai
// refs: https://github.com/sashabaranov/go-openai/issues/343 // refs: https://git.vaala.cloud/VaalaCat/go-openai/issues/343
if _, ok := rawMap["type"]; ok { if _, ok := rawMap["type"]; ok {
err = json.Unmarshal(rawMap["type"], &e.Type) err = json.Unmarshal(rawMap["type"], &e.Type)
if err != nil { if err != nil {

View File

@@ -6,7 +6,7 @@ import (
"reflect" "reflect"
"testing" "testing"
"github.com/sashabaranov/go-openai" "git.vaala.cloud/VaalaCat/go-openai"
) )
func TestAPIErrorUnmarshalJSON(t *testing.T) { func TestAPIErrorUnmarshalJSON(t *testing.T) {

View File

@@ -11,7 +11,7 @@ import (
"net/url" "net/url"
"os" "os"
"github.com/sashabaranov/go-openai" "git.vaala.cloud/VaalaCat/go-openai"
) )
func Example() { func Example() {

View File

@@ -6,7 +6,7 @@ import (
"fmt" "fmt"
"os" "os"
"github.com/sashabaranov/go-openai" "git.vaala.cloud/VaalaCat/go-openai"
) )
func main() { func main() {

View File

@@ -5,8 +5,8 @@ import (
"fmt" "fmt"
"os" "os"
"github.com/sashabaranov/go-openai" "git.vaala.cloud/VaalaCat/go-openai"
"github.com/sashabaranov/go-openai/jsonschema" "git.vaala.cloud/VaalaCat/go-openai/jsonschema"
) )
func main() { func main() {

View File

@@ -5,7 +5,7 @@ import (
"fmt" "fmt"
"os" "os"
"github.com/sashabaranov/go-openai" "git.vaala.cloud/VaalaCat/go-openai"
) )
func main() { func main() {

View File

@@ -5,7 +5,7 @@ import (
"fmt" "fmt"
"os" "os"
"github.com/sashabaranov/go-openai" "git.vaala.cloud/VaalaCat/go-openai"
) )
func main() { func main() {

View File

@@ -6,7 +6,7 @@ import (
"fmt" "fmt"
"os" "os"
"github.com/sashabaranov/go-openai" "git.vaala.cloud/VaalaCat/go-openai"
) )
func main() { func main() {

View File

@@ -12,8 +12,8 @@ import (
"testing" "testing"
"time" "time"
"github.com/sashabaranov/go-openai" "git.vaala.cloud/VaalaCat/go-openai"
"github.com/sashabaranov/go-openai/internal/test/checks" "git.vaala.cloud/VaalaCat/go-openai/internal/test/checks"
) )
func TestFileBytesUpload(t *testing.T) { func TestFileBytesUpload(t *testing.T) {

View File

@@ -7,8 +7,8 @@ import (
"os" "os"
"testing" "testing"
utils "github.com/sashabaranov/go-openai/internal" utils "git.vaala.cloud/VaalaCat/go-openai/internal"
"github.com/sashabaranov/go-openai/internal/test/checks" "git.vaala.cloud/VaalaCat/go-openai/internal/test/checks"
) )
func TestFileBytesUploadWithFailingFormBuilder(t *testing.T) { func TestFileBytesUploadWithFailingFormBuilder(t *testing.T) {

View File

@@ -7,8 +7,8 @@ import (
"net/http" "net/http"
"testing" "testing"
"github.com/sashabaranov/go-openai" "git.vaala.cloud/VaalaCat/go-openai"
"github.com/sashabaranov/go-openai/internal/test/checks" "git.vaala.cloud/VaalaCat/go-openai/internal/test/checks"
) )
const testFineTuneID = "fine-tune-id" const testFineTuneID = "fine-tune-id"

View File

@@ -7,8 +7,8 @@ import (
"net/http" "net/http"
"testing" "testing"
"github.com/sashabaranov/go-openai" "git.vaala.cloud/VaalaCat/go-openai"
"github.com/sashabaranov/go-openai/internal/test/checks" "git.vaala.cloud/VaalaCat/go-openai/internal/test/checks"
) )
const testFineTuninigJobID = "fine-tuning-job-id" const testFineTuninigJobID = "fine-tuning-job-id"

2
go.mod
View File

@@ -1,3 +1,3 @@
module github.com/sashabaranov/go-openai module git.vaala.cloud/VaalaCat/go-openai
go 1.18 go 1.18

View File

@@ -11,8 +11,8 @@ import (
"testing" "testing"
"time" "time"
"github.com/sashabaranov/go-openai" "git.vaala.cloud/VaalaCat/go-openai"
"github.com/sashabaranov/go-openai/internal/test/checks" "git.vaala.cloud/VaalaCat/go-openai/internal/test/checks"
) )
func TestImages(t *testing.T) { func TestImages(t *testing.T) {

View File

@@ -1,8 +1,8 @@
package openai //nolint:testpackage // testing private field package openai //nolint:testpackage // testing private field
import ( import (
utils "github.com/sashabaranov/go-openai/internal" utils "git.vaala.cloud/VaalaCat/go-openai/internal"
"github.com/sashabaranov/go-openai/internal/test/checks" "git.vaala.cloud/VaalaCat/go-openai/internal/test/checks"
"context" "context"
"fmt" "fmt"

View File

@@ -5,8 +5,8 @@ import (
"errors" "errors"
"testing" "testing"
utils "github.com/sashabaranov/go-openai/internal" utils "git.vaala.cloud/VaalaCat/go-openai/internal"
"github.com/sashabaranov/go-openai/internal/test" "git.vaala.cloud/VaalaCat/go-openai/internal/test"
) )
func TestErrorAccumulatorBytes(t *testing.T) { func TestErrorAccumulatorBytes(t *testing.T) {

View File

@@ -1,7 +1,7 @@
package openai //nolint:testpackage // testing private field package openai //nolint:testpackage // testing private field
import ( import (
"github.com/sashabaranov/go-openai/internal/test/checks" "git.vaala.cloud/VaalaCat/go-openai/internal/test/checks"
"bytes" "bytes"
"errors" "errors"

View File

@@ -1,7 +1,7 @@
package test package test
import ( import (
"github.com/sashabaranov/go-openai/internal/test/checks" "git.vaala.cloud/VaalaCat/go-openai/internal/test/checks"
"net/http" "net/http"
"os" "os"

View File

@@ -5,7 +5,7 @@ import (
"reflect" "reflect"
"testing" "testing"
"github.com/sashabaranov/go-openai/jsonschema" "git.vaala.cloud/VaalaCat/go-openai/jsonschema"
) )
func TestDefinition_MarshalJSON(t *testing.T) { func TestDefinition_MarshalJSON(t *testing.T) {

View File

@@ -3,7 +3,7 @@ package jsonschema_test
import ( import (
"testing" "testing"
"github.com/sashabaranov/go-openai/jsonschema" "git.vaala.cloud/VaalaCat/go-openai/jsonschema"
) )
func Test_Validate(t *testing.T) { func Test_Validate(t *testing.T) {

View File

@@ -7,9 +7,9 @@ import (
"net/http" "net/http"
"testing" "testing"
"github.com/sashabaranov/go-openai" "git.vaala.cloud/VaalaCat/go-openai"
"github.com/sashabaranov/go-openai/internal/test" "git.vaala.cloud/VaalaCat/go-openai/internal/test"
"github.com/sashabaranov/go-openai/internal/test/checks" "git.vaala.cloud/VaalaCat/go-openai/internal/test/checks"
) )
var emptyStr = "" var emptyStr = ""

View File

@@ -9,8 +9,8 @@ import (
"testing" "testing"
"time" "time"
"github.com/sashabaranov/go-openai" "git.vaala.cloud/VaalaCat/go-openai"
"github.com/sashabaranov/go-openai/internal/test/checks" "git.vaala.cloud/VaalaCat/go-openai/internal/test/checks"
) )
const testFineTuneModelID = "fine-tune-model-id" const testFineTuneModelID = "fine-tune-model-id"

View File

@@ -11,8 +11,8 @@ import (
"testing" "testing"
"time" "time"
"github.com/sashabaranov/go-openai" "git.vaala.cloud/VaalaCat/go-openai"
"github.com/sashabaranov/go-openai/internal/test/checks" "git.vaala.cloud/VaalaCat/go-openai/internal/test/checks"
) )
// TestModeration Tests the moderations endpoint of the API using the mocked server. // TestModeration Tests the moderations endpoint of the API using the mocked server.

View File

@@ -1,8 +1,8 @@
package openai_test package openai_test
import ( import (
"github.com/sashabaranov/go-openai" "git.vaala.cloud/VaalaCat/go-openai"
"github.com/sashabaranov/go-openai/internal/test" "git.vaala.cloud/VaalaCat/go-openai/internal/test"
) )
func setupOpenAITestServer() (client *openai.Client, server *test.ServerTest, teardown func()) { func setupOpenAITestServer() (client *openai.Client, server *test.ServerTest, teardown func()) {

View File

@@ -3,8 +3,8 @@ package openai_test
import ( import (
"context" "context"
openai "github.com/sashabaranov/go-openai" openai "git.vaala.cloud/VaalaCat/go-openai"
"github.com/sashabaranov/go-openai/internal/test/checks" "git.vaala.cloud/VaalaCat/go-openai/internal/test/checks"
"encoding/json" "encoding/json"
"fmt" "fmt"

View File

@@ -11,9 +11,9 @@ import (
"path/filepath" "path/filepath"
"testing" "testing"
"github.com/sashabaranov/go-openai" "git.vaala.cloud/VaalaCat/go-openai"
"github.com/sashabaranov/go-openai/internal/test" "git.vaala.cloud/VaalaCat/go-openai/internal/test"
"github.com/sashabaranov/go-openai/internal/test/checks" "git.vaala.cloud/VaalaCat/go-openai/internal/test/checks"
) )
func TestSpeechIntegration(t *testing.T) { func TestSpeechIntegration(t *testing.T) {

View File

@@ -7,7 +7,7 @@ import (
"io" "io"
"net/http" "net/http"
utils "github.com/sashabaranov/go-openai/internal" utils "git.vaala.cloud/VaalaCat/go-openai/internal"
) )
var ( var (

View File

@@ -6,9 +6,9 @@ import (
"errors" "errors"
"testing" "testing"
utils "github.com/sashabaranov/go-openai/internal" utils "git.vaala.cloud/VaalaCat/go-openai/internal"
"github.com/sashabaranov/go-openai/internal/test" "git.vaala.cloud/VaalaCat/go-openai/internal/test"
"github.com/sashabaranov/go-openai/internal/test/checks" "git.vaala.cloud/VaalaCat/go-openai/internal/test/checks"
) )
var errTestUnmarshalerFailed = errors.New("test unmarshaler failed") var errTestUnmarshalerFailed = errors.New("test unmarshaler failed")

View File

@@ -10,8 +10,8 @@ import (
"testing" "testing"
"time" "time"
"github.com/sashabaranov/go-openai" "git.vaala.cloud/VaalaCat/go-openai"
"github.com/sashabaranov/go-openai/internal/test/checks" "git.vaala.cloud/VaalaCat/go-openai/internal/test/checks"
) )
func TestCompletionsStreamWrongModel(t *testing.T) { func TestCompletionsStreamWrongModel(t *testing.T) {

View File

@@ -7,8 +7,8 @@ import (
"net/http" "net/http"
"testing" "testing"
openai "github.com/sashabaranov/go-openai" openai "git.vaala.cloud/VaalaCat/go-openai"
"github.com/sashabaranov/go-openai/internal/test/checks" "git.vaala.cloud/VaalaCat/go-openai/internal/test/checks"
) )
// TestThread Tests the thread endpoint of the API using the mocked server. // TestThread Tests the thread endpoint of the API using the mocked server.

View File

@@ -3,8 +3,8 @@ package openai_test
import ( import (
"context" "context"
openai "github.com/sashabaranov/go-openai" openai "git.vaala.cloud/VaalaCat/go-openai"
"github.com/sashabaranov/go-openai/internal/test/checks" "git.vaala.cloud/VaalaCat/go-openai/internal/test/checks"
"encoding/json" "encoding/json"
"fmt" "fmt"