Skip to content

Commit

Permalink
Merge pull request #2 from lion-agi/modified-init
Browse files Browse the repository at this point in the history
updated init, bump version to 0.1.1
  • Loading branch information
ohdearquant authored Sep 26, 2024
2 parents fa9b117 + 0ba622e commit 8d617fe
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 10 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# lion-service
# lion-service

API services for lion framework
14 changes: 11 additions & 3 deletions lion_service/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
from .version import __version__
from .rate_limiter import RateLimiter, RateLimitError
from .service import Service, register_service
from .rate_limiter import RateLimiter
from .service_util import invoke_retry
from .version import __version__

__all__ = ["Service", "register_service", "RateLimiter", "__version__"]
__all__ = [
"Service",
"register_service",
"RateLimiter",
"__version__",
"RateLimitError",
"invoke_retry",
]
5 changes: 3 additions & 2 deletions lion_service/rate_limiter.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
from collections import deque
from datetime import datetime, UTC, timezone
from datetime import UTC, datetime, timezone

from pydantic import BaseModel, Field

from .complete_request_info import CompleteRequestInfo, CompleteRequestTokenInfo
from .complete_request_info import (CompleteRequestInfo,
CompleteRequestTokenInfo)


class RateLimiter(BaseModel):
Expand Down
1 change: 1 addition & 0 deletions lion_service/service_util.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import asyncio
from functools import wraps

from .rate_limiter import RateLimitError


Expand Down
2 changes: 1 addition & 1 deletion lion_service/token_calculator.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import tiktoken
from abc import abstractmethod

import tiktoken
from pydantic import BaseModel, Field, field_validator


Expand Down
2 changes: 1 addition & 1 deletion lion_service/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.1.0"
__version__ = "0.1.1"
16 changes: 15 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "lion-service"
version = "0.1.0"
version = "0.1.1"
description = ""
authors = ["OceanLi <[email protected]>"]
readme = "README.md"
Expand All @@ -14,6 +14,7 @@ tiktoken = "^0.7.0"
[tool.poetry.group.dev.dependencies]
pytest = "^8.3.3"
black = "^24.8.0"
isort = "^5.13.2"

[build-system]
requires = ["poetry-core"]
Expand Down

0 comments on commit 8d617fe

Please sign in to comment.