Skip to content

chore: fix typos and broken links #522

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 20, 2024
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: 1 addition & 1 deletion .github/workflows/links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- uses: actions/checkout@v4

- name: Link Checker
uses: lycheeverse/lychee-action@v1.9.3
uses: lycheeverse/lychee-action@v1
with:
fail: true
args: --verbose --no-progress --format detailed .
2 changes: 1 addition & 1 deletion docs/source/examples/embedding.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# OpenAI compatible embedding service

This example shows how to create an embedding service that is compatible with the [OpenAI API](https://platform.openai.com/docs/api-reference/embeddings/object).
This example shows how to create an embedding service that is compatible with the [OpenAI API](https://platform.openai.com/docs/api-reference/embeddings).

In this example, we use the embedding model from [HuggingFace LeaderBoard](https://huggingface.co/spaces/mteb/leaderboard).

Expand Down
2 changes: 1 addition & 1 deletion mosec/dry_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ def terminate(self, signum, framestack):
self.shutdown_notify.set()

def run(self):
"""Execute thr dry run process."""
"""Execute the dry run process."""
for endpoint, runtimes in self.router.items():
logger.info(
"init dry run for endpoint %s with %s",
Expand Down
5 changes: 1 addition & 4 deletions mosec/mixin/typed_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,8 @@ def deserialize(self, data: Any) -> Any:
"""Deserialize and validate request with msgspec."""
import msgspec

if not self._input_typ:
if self._input_typ is None:
self._input_typ = parse_func_type(self.forward, ParseTarget.INPUT)
if not issubclass(self._input_typ, msgspec.Struct):
# skip other annotation type
return super().deserialize(data)

try:
return msgspec.msgpack.decode(data, type=self._input_typ)
Expand Down
2 changes: 1 addition & 1 deletion src/routes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const RESPONSE_EMPTY: &[u8] = b"no data provided";
const RESPONSE_TOO_LARGE: &[u8] = b"request body is too large";
const RESPONSE_SHUTDOWN: &[u8] = b"gracefully shutting down";
const DEFAULT_RESPONSE_MIME: &str = "application/json";
const DEFAULT_MAX_REQUEST_SIZE: usize = 10 * 1024 * 1024; // 10MB
const DEFAULT_MAX_REQUEST_SIZE: usize = 10 * 1024 * 1024; // 10MiB

fn build_response(status: StatusCode, content: Bytes) -> Response<Body> {
Response::builder()
Expand Down