Skip to content
This repository has been archived by the owner on Oct 14, 2024. It is now read-only.

Commit

Permalink
Merge pull request #200 from janhq/cortexcpp
Browse files Browse the repository at this point in the history
docs: Update Installation, overview, quickstart and Cortex version commands
  • Loading branch information
gabrielle-ong authored Oct 3, 2024
2 parents fbf43a7 + 8b9042c commit 310b82e
Show file tree
Hide file tree
Showing 15 changed files with 331 additions and 58 deletions.
16 changes: 8 additions & 8 deletions docs/basic-usage/overview.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: API
description: Cortex Server Overview.
title: Overview
description: Overview.
slug: "basic-usage"
---

Expand All @@ -20,25 +20,25 @@ Cortex has an [API server](https://cortex.so/api-reference) that runs at `localh
<TabItem value="MacOs/Linux" label="MacOs/Linux">
```sh
# Stable
cortex
cortex start

# Beta
cortex-beta
cortex-beta start

# Nightly
cortex-nightly
cortex-nightly start
```
</TabItem>
<TabItem value="Windows" label="Windows">
```sh
# Stable
cortex.exe
cortex.exe start

# Beta
cortex-beta.exe
cortex-beta.exe start

# Nightly
cortex-nightly.exe
cortex-nightly.exe start
```
</TabItem>
</Tabs>
Expand Down
15 changes: 9 additions & 6 deletions docs/cli/chat.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,29 +21,32 @@ This CLI command calls the following API endpoint:
This command starts a chat session with a specified model, allowing you to interact directly with it through an interactive chat interface.

## Usage
:::info
You can use the `--verbose` flag to display more detailed output of the internal processes. To apply this flag, use the following format: `cortex --verbose [subcommand]`.
:::
<Tabs>
<TabItem value="MacOs/Linux" label="MacOs/Linux">
```sh
# Stable
cortex chat [options] <model_id> <message>
cortex chat [options] <model_id> -m <message>

# Beta
cortex-beta chat [options] <model_id> <message>
cortex-beta chat [options] <model_id> -m <message>

# Nightly
cortex-nightly chat [options] <model_id> <message>
cortex-nightly chat [options] <model_id> -m <message>
```
</TabItem>
<TabItem value="Windows" label="Windows">
```sh
# Stable
cortex.exe chat [options] <model_id> <message>
cortex.exe chat [options] <model_id> -m <message>

# Beta
cortex-beta.exe chat [options] <model_id> <message>
cortex-beta.exe chat [options] <model_id> -m <message>

# Nightly
cortex-nightly.exe chat [options] <model_id> <message>
cortex-nightly.exe chat [options] <model_id> -m <message>
```
</TabItem>
</Tabs>
Expand Down
34 changes: 11 additions & 23 deletions docs/cli/cortex.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,53 +12,40 @@ import TabItem from "@theme/TabItem";
:::

# Cortex
:::info
This is the initial command you need to run to start using Cortex.cpp.
:::

This command starts the Cortex.cpp API server, which runs on port `3928` by default.
This command list all the available commands within the Cortex.cpp commands.

## Usage
:::info
You can use the `--verbose` flag to display more detailed output of the internal processes. To apply this flag, use the following format: `cortex --verbose [subcommand]`.
:::
<Tabs>
<TabItem value="MacOs/Linux" label="MacOs/Linux">
```sh
# Stable
cortex [command] [options]
cortex

# Beta
cortex-beta [command] [options]
cortex-beta

# Nightly
cortex-nightly [command] [options]
cortex-nightly
```
</TabItem>
<TabItem value="Windows" label="Windows">
```sh
# Stable
cortex.exe [command] [options]
cortex.exe

# Beta
cortex-beta.exe [command] [options]
cortex-beta.exe

# Nightly
cortex-nightly.exe [command] [options]
cortex-nightly.exe
```
</TabItem>
</Tabs>


## Options

| Option | Description | Required | Default value | Example |
| ---------------------------- | ----------------------------------------- | -------- | ------------- | ----------------------------- |
| `-v`, `--version` | Show version. | No | - | `-v` |
| `-h`, `--help` | Display help information for the command. | No | - | `-h` |
| `--verbose` | Show the detailed command logs | No | - | `--verbose` |
<!-- | `-a`, `--address <address>` | Address to use. | No | - | `-a 192.168.1.1` |
| `-p`, `--port <port>` | Port to serve the application. | No | - | `-p 1337` | -->
<!--| `--dataFolder <dataFolder>` | Set the data folder directory | No | - | `--dataFolder /path/to/data` | -->


## Command Chaining
Cortex CLI's command chaining support allows multiple commands to be executed in sequence with a simplified syntax.

Expand All @@ -77,4 +64,5 @@ For example:
- [cortex pull|download](/docs/cli/pull): Download a model.
- [cortex run](/docs/cli/run): Shortcut to start a model and chat.
- [cortex update](/docs/cli/update): Update the Cortex.cpp version.
- [cortex start](/docs/cli/start): Start the Cortex.cpp API server.
- [cortex stop](/docs/cli/stop): Stop the Cortex.cpp API server.
4 changes: 3 additions & 1 deletion docs/cli/embeddings.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ This command creates the embedding vector representing the input text.


## Usage

:::info
You can use the `--verbose` flag to display more detailed output of the internal processes. To apply this flag, use the following format: `cortex --verbose [subcommand]`.
:::
<Tabs>
<TabItem value="MacOs/Linux" label="MacOs/Linux">
```sh
Expand Down
15 changes: 15 additions & 0 deletions docs/cli/engines/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ This command allows you to manage various engines available within Cortex.


**Usage**:
:::info
You can use the `--verbose` flag to display more detailed output of the internal processes. To apply this flag, use the following format: `cortex --verbose [subcommand]`.
:::
<Tabs>
<TabItem value="MacOs/Linux" label="MacOs/Linux">
```sh
Expand Down Expand Up @@ -61,6 +64,9 @@ This command returns an engine detail defined by an engine `engine_name`.


**Usage**:
:::info
You can use the `--verbose` flag to display more detailed output of the internal processes. To apply this flag, use the following format: `cortex --verbose [subcommand]`.
:::
<Tabs>
<TabItem value="MacOs/Linux" label="MacOs/Linux">
```sh
Expand Down Expand Up @@ -121,6 +127,9 @@ This command lists all the Cortex's engines.


**Usage**:
:::info
You can use the `--verbose` flag to display more detailed output of the internal processes. To apply this flag, use the following format: `cortex --verbose [subcommand]`.
:::
<Tabs>
<TabItem value="MacOs/Linux" label="MacOs/Linux">
```sh
Expand Down Expand Up @@ -182,6 +191,9 @@ This command downloads the required dependencies and installs the engine within
- `Tensorrt-llm`

**Usage**:
:::info
You can use the `--verbose` flag to display more detailed output of the internal processes. To apply this flag, use the following format: `cortex --verbose [subcommand]`.
:::
<Tabs>
<TabItem value="MacOs/Linux" label="MacOs/Linux">
```sh
Expand Down Expand Up @@ -234,6 +246,9 @@ cortex engines install tensorrt-llm
This command uninstalls the engine within Cortex.

**Usage**:
:::info
You can use the `--verbose` flag to display more detailed output of the internal processes. To apply this flag, use the following format: `cortex --verbose [subcommand]`.
:::
<Tabs>
<TabItem value="MacOs/Linux" label="MacOs/Linux">
```sh
Expand Down
Loading

0 comments on commit 310b82e

Please sign in to comment.