Commit graph

760 commits

Author SHA1 Message Date
Krrish Dholakia
e1925d0e29 fix(router.py): support retry and fallbacks for atext_completion 2023-12-30 11:19:32 +05:30
ishaan-jaff
d5cbef4e36 (feat) proxy - support dynamic timeout per request 2023-12-30 10:55:42 +05:30
ishaan-jaff
27f8598867 (feat) add cloudflare streaming 2023-12-29 12:01:26 +05:30
ishaan-jaff
b990fc8324 (feat) cloudflare ai workers - add completion support 2023-12-29 11:34:58 +05:30
Krrish Dholakia
a88f07dc60 fix(main.py): fix async text completion streaming + add new tests 2023-12-29 11:33:42 +05:30
ishaan-jaff
796e735881 (feat) v0 adding cloudflare 2023-12-29 09:32:29 +05:30
ishaan-jaff
2a147579ec (feat) add voyage ai embeddings 2023-12-28 17:10:15 +05:30
ishaan-jaff
12c6a00938 (feat) add mistral api embeddings 2023-12-28 16:41:55 +05:30
Krrish Dholakia
2285282ef8 feat(health_check.py): more detailed health check calls 2023-12-28 09:12:57 +05:30
ishaan-jaff
1100993834 (fix) use client for text_completion() 2023-12-27 15:20:26 +05:30
Krrish Dholakia
fd5e6efb1d fix(azure.py,-openai.py): correctly raise errors if streaming calls fail 2023-12-27 15:08:37 +05:30
Krrish Dholakia
2269f01c17 fix: fix linting issues 2023-12-27 12:21:31 +05:30
Krish Dholakia
fabfe42af3 Merge pull request #1248 from danikhan632/main
updated oobabooga to new api and support for embeddings
2023-12-27 11:33:56 +05:30
Ishaan Jaff
daead14f0c Merge pull request #1249 from evantancy/main
fix: helicone logging
2023-12-27 11:24:19 +05:30
evantancy
09d3972b64 fix: helicone logging 2023-12-27 12:16:29 +08:00
dan
c7be18cf46 updated oobabooga to new api and support for embeddings 2023-12-26 19:45:28 -05:00
ishaan-jaff
eb49826e4e (fix) support ollama_chat for acompletion 2023-12-26 20:01:51 +05:30
Krrish Dholakia
b25a8c3b42 fix(main.py): support ttl being set for completion, embedding, image generation calls 2023-12-26 17:22:40 +05:30
ishaan-jaff
105dacb6fa (chore) completion - move functions lower 2023-12-26 14:35:59 +05:30
ishaan-jaff
c1b1d0d15d (feat) support logprobs, top_logprobs openai 2023-12-26 14:00:42 +05:30
ishaan-jaff
6f19117fb3 (feat) add logprobs, top_logprobs to litellm.completion 2023-12-26 13:39:48 +05:30
ishaan-jaff
39ea228046 (feat) ollama chat 2023-12-25 23:04:17 +05:30
ishaan-jaff
edf2b60765 (feat) add ollama_chat v0 2023-12-25 14:27:10 +05:30
Krrish Dholakia
79978c44ba refactor: add black formatting 2023-12-25 14:11:20 +05:30
Krrish Dholakia
6d73a77b01 fix(proxy_server.py): raise streaming exceptions 2023-12-25 07:18:09 +05:30
Krrish Dholakia
70f4dabff6 feat(gemini.py): add support for completion calls for gemini-pro (google ai studio) 2023-12-24 09:42:58 +05:30
Krrish Dholakia
b7a7c3a4e5 feat(ollama.py): add support for async ollama embeddings 2023-12-23 18:01:25 +05:30
Krrish Dholakia
c084f04a35 fix(router.py): add support for async image generation endpoints 2023-12-21 14:38:44 +05:30
Mateo Cámara
e60e1afa53 feat: added explicit args to acomplete 2023-12-20 19:49:12 +01:00
Krrish Dholakia
a8f997eceb feat(main.py): add async image generation support 2023-12-20 16:58:40 +05:30
Krrish Dholakia
23d0278739 feat(azure.py): add support for azure image generations endpoint 2023-12-20 16:37:21 +05:30
Krrish Dholakia
636ac9b605 feat(ollama.py): add support for ollama function calling 2023-12-20 14:59:55 +05:30
Krish Dholakia
7e3f9d344c Merge branch 'main' into main 2023-12-18 17:54:34 -08:00
Krrish Dholakia
e03713ef74 fix(main.py): return async completion calls 2023-12-18 17:41:54 -08:00
ishaan-jaff
121149fed4 (feat) OR default transforms=[] 2023-12-18 10:59:09 +05:30
ishaan-jaff
37554f7e3e (fix) default args batch completion 2023-12-18 10:05:44 +05:30
ishaan-jaff
49f57ddd54 (feat) completion set function, function_call default None 2023-12-18 09:54:43 +05:30
ishaan-jaff
759a4702d7 (feat) openrouter set transforms=[] default 2023-12-18 09:16:33 +05:30
Joel Eriksson
76e6b40337 Fix for issue that occured when proxying to ollama
In the text_completion() function, it previously threw an exception at:
raw_response = response._hidden_params.get("original_response", None)

Due to response being an coroutine object to an ollama_acompletion call,
so I added an asyncio.iscoroutine() check for the response and handle it
by calling response = asyncio.run(response)

I also had to fix atext_completion(), where init_response was an instance
of TextCompletionResponse.

Since this case was not handled by the if-elif that checks if init_response
is a coroutine, a dict or a ModelResponse instance, response was unbound
which threw an exception on the "return response" line.

Note that a regular pyright based linter detects that response is possibly
unbound, and that the same code pattern is used in multiple other places
in main.py.

I would suggest that you either change these cases:

init_response = await loop.run_in_executor(...
if isinstance(init_response, ...
    response = init_response
elif asyncio.iscoroutine(init_response):
    response = await init_response

To either just:

response = await loop.run_in_executor(
if asyncio.iscoroutine(response):
    response = await response

Or at the very least, include an else statement and set response = init_response,
so that response is never unbound when the code proceeds.
2023-12-17 17:27:47 +02:00
Krrish Dholakia
5f4310f592 fix(ollama.py): fix sync ollama streaming 2023-12-16 21:23:21 -08:00
Krrish Dholakia
51cb16a015 feat(main.py): add support for image generation endpoint 2023-12-16 21:07:29 -08:00
Krrish Dholakia
662324afd4 docs(routing.md): add docs on using caching groups across deployments 2023-12-15 21:51:59 -08:00
Krrish Dholakia
e76ed6be7d feat(router.py): support caching groups 2023-12-15 21:45:51 -08:00
ishaan-jaff
90bb6d4caf (feat) add ollama/llava 2023-12-16 10:35:27 +05:30
Krrish Dholakia
726289cb49 fix(huggingface_restapi.py): add support for additional hf embedding formats 2023-12-15 21:02:41 -08:00
Krrish Dholakia
3d6ade8f26 fix(ollama.py): fix ollama async streaming for /completions calls 2023-12-15 09:28:32 -08:00
Krrish Dholakia
096f3baea6 fix(main.py): log user for embedding calls 2023-12-14 15:14:37 -08:00
Krrish Dholakia
bb5b883316 fix(main.py): support async streaming for text completions endpoint 2023-12-14 13:56:32 -08:00
ishaan-jaff
303d9aa286 (feat) add mistral api 2023-12-14 18:17:48 +05:30
ishaan-jaff
773b1adf5e (fix) aembedding - don't pop aembedding out 2023-12-14 17:13:35 +05:30