Commit Graph

3 Commits

Author SHA1 Message Date
GargantuaX
be253c2d63 change azure engine config to modelMapper (#306)
* change azure engine config to azure modelMapper config

* Update go.mod

* Revert "Update go.mod"

This reverts commit 78d14c58f2a9ce668da43f6adbe20b60afcfe0d7.

* lint fix

* add test

* lint fix

* lint fix

* lint fix

* opt

* opt

* opt

* opt
2023-05-11 01:30:24 +04:00
biubiu7
c2b58e77ed Fixing missing OrgId assignment issue in the ChatCompletionStream (#268)
* Update client.go

* Add test

---------

Co-authored-by: panjiajia <panjiajia@haoshuo.com>
2023-04-20 14:08:29 +01:00
ttys3
8677fb4bb4 feat: add azure openai support (#214)
* feat: add azure openai support

* chore: refine config

* chore: make config options like the python one

* chore: adjust config struct field order

* test: fix tests

* style: make the linter happy

* fix: support Azure API Key authentication in sendRequest

* chore: check error in CreateChatCompletionStream

* chore: pass tests

* chore: try pass tests again

* chore: change ClientConfig back due to this lib does not like WithXxx config style

* chore: revert fix to CreateChatCompletionStream() due to cause tests not pass

* chore: at least add some comment about the required fields

* chore: re order ClientConfig fields

* chore: add DefaultAzure()

* chore: set default api_version the same as py one "2023-03-15-preview"

* style: fixup typo

* test: add api_internal_test.go

* style: make lint happy

* chore: add constant AzureAPIKeyHeader

* chore: use AzureAPIKeyHeader for api-key header, fix azure base url auto trim suffix /

* test: add TestAzureFullURL, TestRequestAuthHeader and TestOpenAIFullURL

* test: simplify TestRequestAuthHeader

* test: refine TestOpenAIFullURL

* chore: refine comments

* feat: DefaultAzureConfig
2023-04-04 12:05:20 +04:00