Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
  • Loading branch information
sam-goldman committed Jul 13, 2024
1 parent a0bccc9 commit 7fc35a9
Show file tree
Hide file tree
Showing 10 changed files with 57 additions and 3 deletions.
6 changes: 6 additions & 0 deletions docs/providers/ai21.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ main()
| Model | Chat Completion | Streaming | JSON Output | Image Input | Function Calling | N > 1 |
| -------------- | --------------- | --------- | ----------- | ----------- | ---------------- | ----- |
| jamba-instruct |||||||

### Legend
| Symbol | Description |
|--------------------|---------------------------------------|
| :white_check_mark: | Supported by Token.js |
| :heavy_minus_sign: | Not supported by the LLM provider, so Token.js cannot support it |
<!-- end compatibility -->

### Legend
Expand Down
6 changes: 6 additions & 0 deletions docs/providers/anthropic.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ main()
| claude-2.1 |||||||
| claude-2.0 |||||||
| claude-instant-1.2 |||||||

### Legend
| Symbol | Description |
|--------------------|---------------------------------------|
| :white_check_mark: | Supported by Token.js |
| :heavy_minus_sign: | Not supported by the LLM provider, so Token.js cannot support it |
<!-- end compatibility -->

### Legend
Expand Down
6 changes: 6 additions & 0 deletions docs/providers/bedrock.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@ main()
| mistral.mistral-7b-instruct-v0:2 |||||||
| mistral.mixtral-8x7b-instruct-v0:1 |||||||
| mistral.mistral-large-2402-v1:0 |||||||

### Legend
| Symbol | Description |
|--------------------|---------------------------------------|
| :white_check_mark: | Supported by Token.js |
| :heavy_minus_sign: | Not supported by the LLM provider, so Token.js cannot support it |
<!-- end compatibility -->

### Legend
Expand Down
6 changes: 6 additions & 0 deletions docs/providers/cohere.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ main()
| command-nightly |||||||
| command-light |||||||
| command-light-nightly |||||||

### Legend
| Symbol | Description |
|--------------------|---------------------------------------|
| :white_check_mark: | Supported by Token.js |
| :heavy_minus_sign: | Not supported by the LLM provider, so Token.js cannot support it |
<!-- end compatibility -->

### Legend
Expand Down
6 changes: 6 additions & 0 deletions docs/providers/gemini.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ main()
| gemini-1.5-pro |||||||
| gemini-1.5-flash |||||||
| gemini-1.0-pro |||||||

### Legend
| Symbol | Description |
|--------------------|---------------------------------------|
| :white_check_mark: | Supported by Token.js |
| :heavy_minus_sign: | Not supported by the LLM provider, so Token.js cannot support it |
<!-- end compatibility -->

### Legend
Expand Down
6 changes: 6 additions & 0 deletions docs/providers/groq.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ main()
| mixtral-8x7b-32768 |||||||
| gemma-7b-it |||||||
| gemma2-9b-it |||||||

### Legend
| Symbol | Description |
|--------------------|---------------------------------------|
| :white_check_mark: | Supported by Token.js |
| :heavy_minus_sign: | Not supported by the LLM provider, so Token.js cannot support it |
<!-- end compatibility -->

### Legend
Expand Down
6 changes: 6 additions & 0 deletions docs/providers/mistral.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ main()
| mistral-large-2402 |||||||
| codestral-latest |||||||
| codestral-2405 |||||||

### Legend
| Symbol | Description |
|--------------------|---------------------------------------|
| :white_check_mark: | Supported by Token.js |
| :heavy_minus_sign: | Not supported by the LLM provider, so Token.js cannot support it |
<!-- end compatibility -->

### Legend
Expand Down
6 changes: 6 additions & 0 deletions docs/providers/openai.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@ main()
| gpt-3.5-turbo-1106 |||||||
| gpt-3.5-turbo-0125 |||||||
| gpt-3.5-turbo-16k-0613 |||||||

### Legend
| Symbol | Description |
|--------------------|---------------------------------------|
| :white_check_mark: | Supported by Token.js |
| :heavy_minus_sign: | Not supported by the LLM provider, so Token.js cannot support it |
<!-- end compatibility -->

### Legend
Expand Down
6 changes: 6 additions & 0 deletions docs/providers/perplexity.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ main()
| llama-3-8b-instruct |||||||
| llama-3-70b-instruct |||||||
| mixtral-8x7b-instruct |||||||

### Legend
| Symbol | Description |
|--------------------|---------------------------------------|
| :white_check_mark: | Supported by Token.js |
| :heavy_minus_sign: | Not supported by the LLM provider, so Token.js cannot support it |
<!-- end compatibility -->

### Legend
Expand Down
6 changes: 3 additions & 3 deletions scripts/docs/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import { readFileSync, writeFileSync } from 'fs'
import { markdownTable } from 'markdown-table'
import { TableDisplayNames, models } from '../../src/models'

const legend = `#### Legend
const legend = `### Legend
| Symbol | Description |
|--------------------|---------------------------------------|
| :white_check_mark: | Supported by Token.js |
| :heavy_minus_sign: | Not supported by the LLM provider, so Token.js cannot support it |`
| :heavy_minus_sign: | Not supported by the LLM provider, so Token.js cannot support it |\n`

const generateCompatibility = async () => {
for (const [provider, compatibility] of Object.entries(models)) {
Expand Down Expand Up @@ -42,7 +42,7 @@ const generateCompatibility = async () => {
const docsSplit = providerDocs.split('<!-- compatibility -->')
const afterCompatibilitySplit = docsSplit[1].split('<!-- end compatibility -->')

const newDocs = `${docsSplit[0]}<!-- compatibility -->\n### Supported Models\n\n${mkdTable}\n<!-- end compatibility -->\n\n${legend}${afterCompatibilitySplit[1]}`
const newDocs = `${docsSplit[0]}<!-- compatibility -->\n## Supported Models\n\n${mkdTable}\n\n${legend}<!-- end compatibility -->${afterCompatibilitySplit[1]}`

writeFileSync(`docs/providers/${provider}.md`, newDocs, 'utf-8')
}
Expand Down

0 comments on commit 7fc35a9

Please sign in to comment.