15 Commits
Author SHA1 Message Date
zeekayandHanzo Dev 88762272c3 refactor(module): declare own import path github.com/hanzoai/go-openai
The fork kept the upstream module path (module github.com/sashabaranov/
go-openai), so every consumer could only reach it through a
"replace github.com/sashabaranov/go-openai => github.com/hanzoai/go-openai"
directive — and Go replace directives do NOT propagate to consumers, so each
downstream repo had to copy the same replace or fail to compile against
fork-only fields (e.g. ReasoningContent). That is the opposite of one-and-
only-one-way.

Declare the fork's OWN module path so it can be required directly and inherited
transitively. Package name stays 'openai' (import identifier unchanged); only
the module path + internal self-imports (/internal, /jsonschema) are renamed.
Upstream issue-URL comments are left intact as attribution. Builds + vets clean.

Co-authored-by: Hanzo Dev <[email protected]>
2026-07-17 21:55:51 -07:00
Oleksandr RedkoandGitHub 4b2b7add52 Simplify tests with T.TempDir (#929) 2025-01-31 18:55:41 +00:00
Adam SmithandGitHub 17b5ed2434 Fix integration test (#762)
* added TestCompletionStream test

moved completion stream testing to seperate function
added NoErrorF
fixes nil pointer reference on stream object

* update integration test models
2024-06-13 17:23:07 +04:00
Urjit Singh BhatiaandGitHub 2aba09d97e fix test server setup: (#549)
* fix test server setup:
- go map access is not deterministic
- this can lead to a route: /foo/bar/1 matching /foo/bar before matching /foo/bar/1 if the map iteration go through /foo/bar first since the regex match wasn't bound to start and end anchors
- registering handlers now converts * in routes to .* for proper regex matching
- test server route handling now tries to fully match the handler route

* add missing /v1 prefix to fine-tuning job cancel test server handler
2023-11-09 12:20:39 +04:00
渡邉祐一 / Yuichi WatanabeandGitHub ab2e98f1ed refactor: refactoring http request creation and sending (#395)
* refactoring http request creation and sending

* fix lint error

* increase the test coverage of client.go

* refactor: Change the style of HTTPRequestBuilder.Build func to one-argument-per-line.
2023-06-22 13:57:52 +04:00
769ac1436b Improve (#356) to support registration of wildcard URLs (#359)
* Improve (#356) to support registration of wildcard URLs

* Add TestAzureChatCompletions & TestAzureChatCompletionsWithCustomDeploymentName

* Remove TestAzureChatCompletionsWithCustomDeploymentName

---------

Co-authored-by: coggsflod <[email protected]>
2023-06-14 18:19:18 +04:00
渡邉祐一 / Yuichi WatanabeandGitHub fdd8f0a82e move error_accumulator into internal pkg (#304) (#335)
* move error_accumulator into internal pkg (#304)

* move error_accumulator into internal pkg (#304)

* add a test for ErrTooManyEmptyStreamMessages in stream_reader (#304)
2023-06-05 18:35:46 +04:00
Mariano DarcandGitHub fae090a737 Implement optional io.Reader in AudioRequest (#303) (#265) (#331)
* Implement optional io.Reader in AudioRequest (#303) (#265)

* Fix err shadowing

* Add test to cover AudioRequest io.Reader usage

* Add additional test cases to cover AudioRequest io.Reader usage

* Add test to cover opening the file specified in an AudioRequest
2023-06-05 10:07:13 +04:00
渡邉祐一 / Yuichi WatanabeandGitHub 50178dc67e move request_builder into internal pkg (#304) (#329)
* move request_builder into internal pkg (#304)

* add some test for internal.RequestBuilder

* add a test for openai.GetEngine
2023-05-31 12:01:42 +04:00
渡邉祐一 / Yuichi WatanabeandGitHub 4f103b982f move marshaller and unmarshaler into internal pkg (#304) (#325) 2023-05-28 05:51:07 +04:00
0ba7ec371b Move form_builder into internal pkg. (#311)
* Move form_uilder into internal pkg.

* Fix import of audio.go

* Reorganize.

* Fix import.

* Fix

---------

Co-authored-by: JoyShi <[email protected]>
2023-05-16 13:38:09 -07:00
JuanandGitHub 458f477f70 Azure openai list models (#290)
* feat(models): include flow for azure openai endpoint

* feat(models): include flow for azure openai endpoint

* feat(models): include flow for azure openai endpoint

* chore(fullURL): update logic to run in fullURL function

* chore(fullURL): update based on pr comments to use c.config.APIVersion
2023-05-03 13:02:35 +04:00
sashabaranovandGitHub 38fd1ae992 Add more tests (#241)
* add form builder tests

* lint

* add client tests

* lint

* add non-existent file test
2023-04-09 18:36:15 +04:00
c253d1e117 Refactor/internal testing (#194)
* added NoError check

* corrected NoError

* has error checks

* replace more checks

* Used checks test helper

* Used checks test helper

* remove duplicate import

* fixed lint issues regarding length of messages

---------

Co-authored-by: Rex Posadas <[email protected]>
2023-03-24 21:55:25 +04:00
c7657494eb Modify the test module, add the file upload test, and add the image edit api (#63)
* Modify the test module, add the file upload test, and add the image editing api

* fix golangci-lint

* fix golangci-lint

* Static file deletion, file directory name modification

* fix

* test-server-related logic encapsulated in a single tidy
 struct

---------

Co-authored-by: julian_huang <[email protected]>
2023-02-11 22:51:53 +04:00