nickthecook / archyve

GNU Affero General Public License v3.0
117 stars 15 forks source link

Add Azure OpenAI client #47

Closed oxaroky02 closed 3 months ago

oxaroky02 commented 3 months ago

Updated to reflect various changes based on feedback; added some tests.

TLDR;

The detailed description is organized as follows.

Model changes

ModelServer

ModelConfig

ApiCall

Caveat: When using Open AI "streaming", we can't retrieve the response body via the interceptor.

LLM Clients

Common

OpenAI Client

Ollama Client

Base Client

Services

Helpers

Common Client Support

API

Testing

oxaronick commented 3 months ago

I'm going to stop there for now. In general, I think it's great! Just some concerns about how the code is structured.

There are no tests, but I can contribute those afterwards. Archyve isn't near 100% test coverage yet, but there are 100-odd tests in there now, and I'm trying to test new code.

oxaroky02 commented 3 months ago

There are no tests, but I can contribute those afterwards. Archyve isn't near 100% test coverage yet, but there are 100-odd tests in there now, and I'm trying to test new code.

Yep. I did want to include tests but I ran into some trouble running the tests. I promise to start adding testing in separate PRs.

oxaroky02 commented 3 months ago

There are no tests, but I can contribute those afterwards. Archyve isn't near 100% test coverage yet, but there are 100-odd tests in there now, and I'm trying to test new code.

Yep. I did want to include tests but I ran into some trouble running the tests. I promise to start adding testing in separate PRs.

OK, figured out my problem with running tests; can run tests now, and found that the old ollama chat test failed due to my refactoring. So I've fixed that so at least all the current tests pass again. Sorry about that.