Skip to content

Commit

Permalink
chore: fix typos and broken links
Browse files Browse the repository at this point in the history
Signed-off-by: Keming <[email protected]>
  • Loading branch information
kemingy committed May 2, 2024
1 parent 7fbdca0 commit 146d2ed
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 8 deletions.
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

0 comments on commit 146d2ed

Please sign in to comment.