Skip to content

Commit

Permalink
Merge branch 'main' into downgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
db0 committed Mar 9, 2024
2 parents 1f4cc23 + 56edbe4 commit d0d1176
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .env_template
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ HORDE_LOGO="https://raw.githubusercontent.com/db0/Stable-Horde/main/img_stable/0
HORDE_HTML_TERMS="terms_of_service.html"
HORDE_HTML_PRIVACY="privacy_policy.html"
HORDE_MARKDOWN_INDEX="index_stable.md"
HORDE_IMAGE_COMPVIS_REFERENCE="https://raw.githubusercontent.com/Haidra-Org/AI-Horde-image-model-reference/main/stable_diffusion.json"
HORDE_IMAGE_DIFFUSERS_REFERENCE="https://raw.githubusercontent.com/Haidra-Org/AI-Horde-image-model-reference/main/diffusers.json"
HORDE_IMAGE_LLM_REFERENCE="https://raw.githubusercontent.com/db0/AI-Horde-text-model-reference/main/db.json"
# Google Oauth2
GOOGLE_CLIENT_ID=""
GLOOGLE_CLIENT_SECRET=""
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

# 4.32.3

* Shared Keys details now include their name
* Allow customizing horde model reference locations

# 4.32.2

* Adds support for customizing the Horde (name/icons/frontpage etc)
Expand Down
1 change: 1 addition & 0 deletions horde/apis/models/v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -758,6 +758,7 @@ def __init__(self, api):
"username": fields.String(
description="The owning user's unique Username. It is a combination of their chosen alias plus their ID.",
),
"name": fields.String(description="The Shared Key Name."),
"kudos": fields.Integer(description="The Kudos limit assigned to this key."),
"expiry": fields.DateTime(
dt_format="rfc822",
Expand Down
2 changes: 1 addition & 1 deletion horde/apis/v2/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -2734,7 +2734,7 @@ class SharedKeySingle(Resource):
@api.response(401, "Invalid API Key", models.response_model_error)
@api.response(404, "Shared Key Not Found", models.response_model_error)
def get(self, sharedkey_id=""):
"""Get details about an existing Shared Key for this user"""
"""Get details about an existing Shared Key"""
self.args = self.get_parser.parse_args()
sharedkey = database.find_sharedkey(sharedkey_id)
if not sharedkey:
Expand Down
1 change: 1 addition & 0 deletions horde/classes/base/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ def get_details(self):
ret_dict = {
"username": self.user.get_unique_alias(),
"id": self.id,
"name": self.name,
"kudos": self.kudos,
"expiry": self.expiry,
"utilized": self.utilized,
Expand Down
2 changes: 1 addition & 1 deletion horde/consts.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
HORDE_VERSION = "4.32.2"
HORDE_VERSION = "4.32.3"

WHITELISTED_SERVICE_IPS = {
"212.227.227.178", # Turing Bot
Expand Down
17 changes: 14 additions & 3 deletions horde/model_reference.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import os

import requests

from horde.logger import logger
Expand Down Expand Up @@ -31,11 +33,17 @@ def call_function(self):
for _riter in range(10):
try:
self.reference = requests.get(
"https://raw.githubusercontent.com/Haidra-Org/AI-Horde-image-model-reference/main/stable_diffusion.json",
os.getenv(
"HORDE_IMAGE_COMPVIS_REFERENCE",
"https://raw.githubusercontent.com/Haidra-Org/AI-Horde-image-model-reference/main/stable_diffusion.json",
),
timeout=2,
).json()
diffusers = requests.get(
"https://raw.githubusercontent.com/Haidra-Org/AI-Horde-image-model-reference/main/diffusers.json",
os.getenv(
"HORDE_IMAGE_DIFFUSERS_REFERENCE",
"https://raw.githubusercontent.com/Haidra-Org/AI-Horde-image-model-reference/main/diffusers.json",
),
timeout=2,
).json()
self.reference.update(diffusers)
Expand All @@ -60,7 +68,10 @@ def call_function(self):
for _riter in range(10):
try:
self.text_reference = requests.get(
"https://raw.githubusercontent.com/db0/AI-Horde-text-model-reference/main/db.json",
os.getenv(
"HORDE_IMAGE_LLM_REFERENCE",
"https://raw.githubusercontent.com/db0/AI-Horde-text-model-reference/main/db.json",
),
timeout=2,
).json()
# logger.debug(self.reference)
Expand Down

0 comments on commit d0d1176

Please sign in to comment.