Skip to content

Commit

Permalink
docs: Add doc for Xinference (#1266)
Browse files Browse the repository at this point in the history
Signed-off-by: Carson Yang <[email protected]>
  • Loading branch information
yangchuansheng authored Apr 22, 2024
1 parent bc0ac6d commit b08d81f
Show file tree
Hide file tree
Showing 13 changed files with 420 additions and 20 deletions.
35 changes: 35 additions & 0 deletions docSite/assets/docs/scss/custom/pages/_custom.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
:root {
--code-bg: rgba(0, 0, 0, 0.03);
--code-color: rgba(14, 116, 144, 0.95);
--inline-code-border: 0.5px solid var(--gray-400);

}

[data-dark-mode] {
--code-bg: hsla(0, 2%, 14%, 1);
--code-color: #f3f4f6ed;
--inline-code-border: 0.5px solid var(--gray-600);
}

#content {
font-family: JetBrains Mono, LXGW WenKai Screen, -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica Neue", "Ubuntu";
}
Expand Down Expand Up @@ -62,11 +75,33 @@ div.code-toolbar {
z-index: 1;
}

.docs-content .main-content pre code {
padding: 0 2.5rem 1.25rem .9rem;
}

.docs-content .main-content code {
font-size: .875em;
padding: 1px 2px;
background: var(--code-bg);
border: var(--inline-code-border);
padding-top: 3px;
padding-bottom: 3px;
padding-left: 5px;
padding-right: 5px;
border-radius: .25rem;
color: var(--code-color);
}

li p {
margin-top: 1rem !important;
margin-bottom: 1rem;
}

.docs-content .main-content ul > li {
margin-top: .3rem !important;
margin-bottom: .3rem;
}

footer {
height: 118px !important;
}
Expand Down
178 changes: 178 additions & 0 deletions docSite/assets/docs/scss/custom/plugins/prism/themes/_lotusdocs.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,178 @@
/**
* Lotus Docs theme
*
* Adapted from a theme based on:
* https://github.com/chriskempson/tomorrow-theme
*
* @author Colin Wilson <github.com/colinwilson>
* @version 1.0
*/

:root {
--prism-code-bg: #faf9f8;
--prism-code-scrollbar-thumb-color: var(--gray-400);
--prism-color: #333;
--prism-bg: #f0f0f0;
--prism-highlight-bg: var(--blue-200);
--prism-copy-bg: var(--gray-500);
--prism-copy-hover-bg: var(--gray-700);
--prism-copy-success-bg: var(--emerald-500);
--prism-token-punctuation: #666;
--prism-token-deleted: #2b6cb0;
--prism-token-function-name: #3182bd;
--prism-token-function: #c53030;
--prism-token-number: var(--cardinal-600);
--prism-token-symbol: #333;
--prism-token-builtin: #1a202c;
--prism-token-regex: #2f855a;
--prism-token-variable: var(--yellow-700);
--prism-token-url: #4fd1c5;
--prism-token-inserted: #38a169;
}

[data-dark-mode] {
--prism-code-bg: var(--gray-900);
--prism-code-scrollbar-thumb-color: var(--gray-600);
--prism-color: #f5fbff;
--prism-bg: #32325d;
--prism-highlight-bg: var(--blue-400);
--prism-copy-bg: var(--gray-400);
--prism-copy-hover-bg: var(--white);
--prism-copy-success-bg: var(--emerald-200);
--prism-token-punctuation: #ccc;
--prism-token-deleted: #7fd3ed;
--prism-token-function-name: #6196cc;
--prism-token-function: #fda3f3;
--prism-token-number: var(--cardinal-200);
--prism-token-symbol: #ffffff;
--prism-token-builtin: #a4cdfe;
--prism-token-regex: #7ec699;
--prism-token-variable: var(--yellow-100);
--prism-token-url: #67cdcc;
--prism-token-inserted: green;
}

code[class*="language-"],
pre[class*="language-"] {
color: var(--prism-color) !important;
background: var(--prism-code-bg) !important;
}

/* Code blocks */
pre[class*="language-"] {
// padding: 1em;
// margin: .5em 0;
overflow: auto;
border-radius: 0 0 4px 4px;
}

:not(pre) > code[class*="language-"],
pre[class*="language-"] {
background: var(--prism-bg);
}

/* Inline code */
:not(pre) > code[class*="language-"] {
padding: .1em;
border-radius: .3em;
white-space: normal;
}

.line-highlight:before,
.line-highlight[data-end]:after {
background-color: var(--prism-highlight-bg);
}

[data-copy-state="copy"] span:empty::before {
background-color: var(--prism-copy-bg);
}

[data-copy-state="copy"] span:empty:hover::before {
background-color: var(--prism-copy-hover-bg);
}

[data-copy-state="copy-success"] span:empty::before {
background-color: var(--prism-copy-success-bg);
}

.token.comment,
.token.block-comment,
.token.prolog,
.token.doctype,
.token.cdata {
color: #999;
}

.token.punctuation {
color: var(--prism-token-punctuation);
}

.token.tag,
.token.attr-name,
.token.namespace,
.token.deleted {
color: var(--prism-token-deleted);
}

.token.function-name {
color: var(--prism-token-function-name);
}

.token.boolean,
.token.function {
color: var(--prism-token-function);
}

.token.number {
color: var(--prism-token-number);
}

.token.property,
.token.class-name,
.token.constant,
.token.symbol {
color: var(--prism-token-symbol);
font-weight: 700;
}

.token.selector,
.token.important,
.token.atrule,
.token.keyword,
.token.builtin {
color: var(--prism-token-builtin);
font-weight: 700;
}

.token.string,
.token.char,
.token.attr-value,
.token.regex {
color: var(--prism-token-regex);
}

.token.variable {
color: var(--prism-token-variable);
}

.token.operator,
.token.entity,
.token.url {
color: var(--prism-token-url);
}

.token.important,
.token.bold {
font-weight: bold;
}
.token.italic {
font-style: italic;
}

.token.entity {
cursor: help;
}

.token.inserted {
color: var(--prism-token-inserted);
}
Binary file added docSite/assets/imgs/fastgpt-list-models.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docSite/assets/imgs/xinference-launch-model.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: '接入 bge-rerank 重排模型'
icon: 'sort'
draft: false
toc: true
weight: 910
weight: 920
---

## 不同模型推荐配置
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: ' 将 FastGPT 接入私有化模型 ChatGLM2和m3e-large'
icon: 'model_training'
draft: false
toc: true
weight: 930
weight: 950
---

## 前言
Expand Down
2 changes: 1 addition & 1 deletion docSite/content/docs/development/custom-models/chatglm2.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: ' 将 FastGPT 接入私有化模型 ChatGLM2-6B'
icon: 'model_training'
draft: false
toc: true
weight: 910
weight: 930
---

## 前言
Expand Down
2 changes: 1 addition & 1 deletion docSite/content/docs/development/custom-models/m3e.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: ' 将 FastGPT 接入私有化模型 M3E'
icon: 'model_training'
draft: false
toc: true
weight: 920
weight: 940
---

## 前言
Expand Down
Loading

0 comments on commit b08d81f

Please sign in to comment.