Skip to content

Commit

Permalink
bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
Qewertyy committed Jan 23, 2024
1 parent 4c947f5 commit 3e4e11d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
2 changes: 1 addition & 1 deletion lexica/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
"languageModels"
]

__version__ = "1.5.3"
__version__ = "1.5.4"
__author__ = "Qewertyy <[email protected]>"
19 changes: 8 additions & 11 deletions lexica/constants.py
Original file line number Diff line number Diff line change
@@ -1,25 +1,22 @@
# Copyright 2024 Qewertyy, MIT License

import re
import re,os

BASE_URL = "https://lexica.qewertyy.dev"
MISC_URL = "https://api.qewertyy.dev"

def get_version():
filename = "__init__.py"
with open(filename) as f:
match = re.search(r"""^__version__ = ['"]([^'"]*)['"]""", f.read(), re.M)
if not match:
raise RuntimeError("{} doesn't contain __version__".format(filename))
version = match.groups()[0]
return version
dirpath = os.path.dirname(os.path.abspath(__file__))
with open(dirpath+"/__init__.py") as f:
match = re.search(r"""^__version__ = ['"]([^'"]*)['"]""", f.read(), re.M)
if not match:
raise RuntimeError("__init__.py doesn't contain __version__")
version = match.groups()[0]

SESSION_HEADERS = {
"Host": "lexica.qewertyy.dev",
"User-Agent":f"Lexica/{get_version()}"
"User-Agent":f"Lexica/{version}",
}


class languageModels(object):
bard = {"modelId":20,"name":"Bard"}
palm = {"modelId":0,"name":"PaLM"}
Expand Down

0 comments on commit 3e4e11d

Please sign in to comment.