[GH-ISSUE #134] Custom OpenAI Endpoint - LiteLLM integration #101

Closed
opened 2026-03-02 23:33:37 +03:00 by kerem · 5 comments
Owner

Originally created by @gabelul on GitHub (Oct 14, 2024).
Original GitHub issue: https://github.com/AJaySi/ALwrity/issues/134

Originally assigned to: @gabelul, @AJaySi on GitHub.

It would be great if we could use our own OpenAI-compatible API endpoint.

Originally created by @gabelul on GitHub (Oct 14, 2024). Original GitHub issue: https://github.com/AJaySi/ALwrity/issues/134 Originally assigned to: @gabelul, @AJaySi on GitHub. It would be great if we could use our own OpenAI-compatible API endpoint.
kerem 2026-03-02 23:33:37 +03:00
Author
Owner

@AJaySi commented on GitHub (Oct 14, 2024):

@gabelul
It would be great if you can give example of it ?
We can then evaluate its pros-cons & its implementation details.

-Thanks.

<!-- gh-comment-id:2410953287 --> @AJaySi commented on GitHub (Oct 14, 2024): @gabelul It would be great if you can give example of it ? We can then evaluate its pros-cons & its implementation details. -Thanks.
Author
Owner

@gabelul commented on GitHub (Oct 14, 2024):

Well, I'm using LiteLLM to rotate through different providers. It's like using Operounter; they have an OpenAI-compatible API endpoint. We would only need to be able to specify the API Endpoint / Base URL and maybe the model, so it's not a significant change code wise

<!-- gh-comment-id:2410981887 --> @gabelul commented on GitHub (Oct 14, 2024): Well, I'm using LiteLLM to rotate through different providers. It's like using Operounter; they have an OpenAI-compatible API endpoint. We would only need to be able to specify the API Endpoint / Base URL and maybe the model, so it's not a significant change code wise
Author
Owner

@AJaySi commented on GitHub (Oct 14, 2024):

@gabelul
May I request for your help in this issue (pretty please). I can help you with present code layout and other gory details.
I am aware of LiteLLM and it will be a great feature addition.

Excuse: We are busy building a nextjs version of ALwrity for non-tech content creators (streamlit version is meant for developers).

Regards.

<!-- gh-comment-id:2411140480 --> @AJaySi commented on GitHub (Oct 14, 2024): @gabelul May I request for your help in this issue (pretty please). I can help you with present code layout and other gory details. I am aware of LiteLLM and it will be a great feature addition. Excuse: We are busy building a nextjs version of ALwrity for non-tech content creators (streamlit version is meant for developers). Regards.
Author
Owner

@gabelul commented on GitHub (Oct 14, 2024):

@AJaySi i can give it a try, sure

<!-- gh-comment-id:2411388241 --> @gabelul commented on GitHub (Oct 14, 2024): @AJaySi i can give it a try, sure
Author
Owner

@AJaySi commented on GitHub (Oct 14, 2024):

Thank you so much @gabelul

Just to get you started:

1). We call appropriate LLMs based on config values from sidebar Or from main_config in ~/AI-Writer/lib/workspace/alwrity_config

2). The above logic is then placed in this file/dir:

~/AI-Writer/lib/gpt_providers$ ls
audio_to_text_generation  image_to_text_gen  text_generation  text_to_image_generation

3). Navigate to text_generation folder and have a look at main_text_generation.py
This file changes should suffice for liteLLM, you may write a new module file for litellm functions there.

Hope, this gets you started, else please post here.

Regards & Thanks.

<!-- gh-comment-id:2411470085 --> @AJaySi commented on GitHub (Oct 14, 2024): Thank you so much @gabelul Just to get you started: 1). We call appropriate LLMs based on config values from sidebar Or from main_config in ~/AI-Writer/lib/workspace/alwrity_config 2). The above logic is then placed in this file/dir: ``` ~/AI-Writer/lib/gpt_providers$ ls audio_to_text_generation image_to_text_gen text_generation text_to_image_generation ``` 3). Navigate to text_generation folder and have a look at **main_text_generation.py** This file changes should suffice for liteLLM, you may write a new module file for litellm functions there. Hope, this gets you started, else please post here. Regards & Thanks.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ALwrity#101
No description provided.