Skip to content

Commit

Permalink
bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
Qewertyy committed Feb 17, 2024
1 parent 0232135 commit fb03f5f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 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.4"
__version__ = "1.5.5"
__author__ = "Qewertyy <[email protected]>"
3 changes: 2 additions & 1 deletion lexica/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ class languageModels(object):
llama = {"modelId":18,"name":"LLAMA"}
gpt = {"modelId":5,"name":"ChatGPT"}
gemini = {"modelId":23,"name":"Gemini-Pro"}
geminiVision = {"modelId":24,"name":"Gemini-Pro-Vision"}
geminiVision = {"modelId":24,"name":"Gemini-Pro-Vision"}
openhermes = {"modelId":27,"name":"OpenHermes"}
4 changes: 2 additions & 2 deletions lexica/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ def SearchImages(self : "Client",query: str, page: int=0,engine: str="google") -
)
return resp

def AntiNsfw(self : "Client", imageUrl: str) -> dict:
def AntiNsfw(self : "Client", imageUrl: str, modelId: int = 28) -> dict:
"""
Check for an image if it is safe for work or not
Example:
Expand All @@ -285,6 +285,6 @@ def AntiNsfw(self : "Client", imageUrl: str) -> dict:
resp = self._request(
url=f'{self.url}/anti-nsfw',
method='POST',
params={"img_url": imageUrl}
params={"img_url": imageUrl,"model_id": modelId}
)
return resp
4 changes: 2 additions & 2 deletions lexica/core_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ async def SearchImages(self : "AsyncClient",query: str, page: int=0,engine: str=
)
return resp

async def AntiNsfw(self : "AsyncClient", imageUrl: str) -> dict:
async def AntiNsfw(self : "AsyncClient", imageUrl: str, modelId: int = 28) -> dict:
"""
Check for an image if it is safe for work or not
Example:
Expand All @@ -296,6 +296,6 @@ async def AntiNsfw(self : "AsyncClient", imageUrl: str) -> dict:
resp = await self._request(
url=f'{self.url}/anti-nsfw',
method='POST',
params={'img_url': imageUrl}
params={'img_url': imageUrl,"model_id":modelId}
)
return resp

0 comments on commit fb03f5f

Please sign in to comment.