Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/git-bob.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ jobs:
GITLAB_API_KEY: "${{ secrets.GITLAB_API_KEY }}"
E_INFRA_CZ_API_KEY: "${{ secrets.E_INFRA_CZ_API_KEY }}"
SCADS_API_KEY: "${{ secrets.SCADS_API_KEY }}"
CUSTOM_LLM_SERVER: "${{ secrets.CUSTOM_LLM_SERVER }}"
CUSTOM_API_KEY: "${{ secrets.CUSTOM_API_KEY }}"
GITHUB_RUN_ID: "${{ github.run_id }}"
TWINE_USERNAME: "${{ secrets.TWINE_USERNAME }}"
TWINE_PASSWORD: "${{ secrets.TWINE_PASSWORD }}"
Expand Down
2 changes: 2 additions & 0 deletions .gitlab/.gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ respond:
KISSKI_API_KEY: "$KISSKI_API_KEY"
BLABLADOR_API_KEY: "$BLABLADOR_API_KEY"
DEEPSEEK_API_KEY: "$DEEPSEEK_API_KEY"
CUSTOM_LLM_SERVER: "$CUSTOM_LLM_SERVER"
CUSTOM_API_KEY: "$CUSTOM_API_KEY"
GITLAB_API_KEY: "$GITLAB_API_TOKEN"
E_INFRA_CZ_API_KEY: "$E_INFRA_CZ_API_KEY"
GITLAB_PIPELINE_ID: "$CI_PIPELINE_ID"
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ git_bob.prompt_handlers =
deepseek = git_bob._endpoints:prompt_deepseek
e-infra_cz = git_bob._endpoints:prompt_e_infra_cz
scads = git_bob._endpoints:prompt_scads
custom = git_bob._endpoints:prompt_custom

git_bob.triggers =
review = git_bob._ai_github_utilities:review_pull_request
Expand Down
2 changes: 1 addition & 1 deletion src/git_bob/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "0.27.2"
__version__ = "0.27.3"

__all__ = (
)
Expand Down
10 changes: 10 additions & 0 deletions src/git_bob/_endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,16 @@ def prompt_scads(message: str, model="openai/gpt-oss-120b", image=None, max_accu
return prompt_openai(message, model=model, image=image, max_accumulated_responses=max_accumulated_responses, max_response_tokens=max_response_tokens, base_url=base_url, api_key=api_key)


def prompt_custom(message: str, model=None, image=None, max_accumulated_responses=10, max_response_tokens=128000, base_url=None, api_key=None):
import os
if base_url is None:
base_url = os.environ.get('CUSTOM_LLM_SERVER')
if api_key is None:
api_key = os.environ.get("CUSTOM_API_KEY")
model = model.replace("custom:", "")
print("model", "_" + model[1:])
return prompt_openai(message, model=model, image=image, max_accumulated_responses=max_accumulated_responses, max_response_tokens=max_response_tokens, base_url=base_url, api_key=api_key)


def prompt_kisski(message: str, model=None, image=None, max_accumulated_responses=10, max_response_tokens=16384, base_url=None, api_key=None):
import os
Expand Down
4 changes: 3 additions & 1 deletion src/git_bob/_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,9 @@ def clean_output(repository, text):
"TWINE_PASSWORD",
"HF_TOKEN",
"DEEPSEEK_API_KEY",
"CODECOV_TOKEN"]
"CODECOV_TOKEN",
"CUSTOM_API_KEY",
"CUSTOM_LLM_SERVER"]

def save_and_clear_environment():
"""Clear all environment variables and store the entire env in a dictionary for restoration later"""
Expand Down
Loading