Commit Graph

14 Commits

Author SHA1 Message Date
VaalaCat
3640274cd1 feat: change repo name 2025-06-15 12:58:45 +00:00
Alexander Baranov
11ad4b69d0 make linter happy (#661) 2024-02-15 16:02:48 +04:00
Grey Baker
4ce03a919a Fix Azure embeddings model detection by passing string to fullURL (#637) 2024-01-16 13:32:48 +04:00
Matthew Jaffee
e01a2d7231 convert EmbeddingModel to string type (#629)
This gives the user the ability to pass in models for embeddings that are not
already defined in the library. Also more closely matches how the completions
API works.
2024-01-15 13:33:02 +04:00
Simon Klee
0664105387 lint: fix linter warnings reported by golangci-lint (#522)
- Fix #519
2023-11-07 13:23:06 +04:00
e. alvarez
84f77a0acd Add DotProduct Method and README Example for Embedding Similarity Search (#492)
* Add DotProduct Method and README Example for Embedding Similarity Search

- Implement a DotProduct() method for the Embedding struct to calculate the dot product between two embeddings.
- Add a custom error type for vector length mismatch.
- Update README.md with a complete example demonstrating how to perform an embedding similarity search for user queries.
- Add unit tests to validate the new DotProduct() method and error handling.

* Update README to focus on Embedding Semantic Similarity
2023-10-02 18:39:10 +04:00
Simone Vellei
8e4b7963a3 Chore Support base64 embedding format (#485)
* chore: support base64 embedding format

* fix: add sizeOfFloat32

* chore: refactor base64 decoding

* chore: add tests

* fix linting

* fix test

* fix return error

* fix: use smaller slice for tests

* fix [skip ci]

* chore: refactor test to consider CreateEmbeddings response

* trigger build

* chore: remove named returns

* chore: refactor code to simplify the understanding

* chore: tests have been refactored to match the encoding format passed by request

* chore: fix tests

* fix

* fix
2023-09-11 17:44:46 +04:00
Jackson Stone
5c7d88212f Allow embeddings requests to be tokens or strings (#417)
* Allow raw tokens to be used as embedding input

* fix linting issues (lines too long)

* add endpoint test for embedding from tokens

* remove redundant comments

* fix comment to match new param name

* change interface to any

* Rename methods and implement convert for base req

* add comments to CreateEmbeddings

* update tests

* shorten line length

* rename parameter
2023-07-06 00:53:53 +03:00
渡邉祐一 / Yuichi Watanabe
b616090e69 refactoring tests with mock servers (#30) (#356) 2023-06-12 17:40:26 +04:00
sashabaranov
4dc1edac38 add embeddings tests (#237) 2023-04-08 19:49:27 +04:00
rex posadas
8e3a04664e 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 <rposadas@redwoodlogistics.com>
2023-03-24 21:55:25 +04:00
Alexander Baranov
9eea94730a rename internally 2023-03-04 15:29:42 +04:00
sashabaranov
47887bf123 Rename and update docs (#120) 2023-03-04 15:18:43 +04:00
Rascal0814
5191ea6f55 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 <julian.huang@yuansuan.com>
2023-02-11 22:51:53 +04:00