Skip to content

Update groq and perplexity models #128

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 3 commits into from
Jan 14, 2025
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
16 changes: 9 additions & 7 deletions docs/providers/groq.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,15 @@ main()
<!-- compatibility -->
## Supported Models

| Model | Chat Completion | Streaming | JSON Output | Image Input | Function Calling | N > 1 |
| ------------------ | --------------- | --------- | ----------- | ----------- | ---------------- | ----- |
| llama3-8b-8192 | ✅ | ✅ | ➖ | ➖ | ➖ | ➖ |
| llama3-70b-8192 | ✅ | ✅ | ✅ | ➖ | ➖ | ➖ |
| mixtral-8x7b-32768 | ✅ | ✅ | ➖ | ➖ | ➖ | ➖ |
| gemma-7b-it | ✅ | ✅ | ✅ | ➖ | ➖ | ➖ |
| gemma2-9b-it | ✅ | ✅ | ✅ | ➖ | ➖ | ➖ |
| Model | Chat Completion | Streaming | JSON Output | Image Input | Function Calling | N > 1 |
| ----------------------- | --------------- | --------- | ----------- | ----------- | ---------------- | ----- |
| llama-3.3-70b-versatile | ✅ | ✅ | ✅ | ➖ | ➖ | ➖ |
| llama-3.1-8b-instant | ✅ | ✅ | ✅ | ➖ | ➖ | ➖ |
| llama3-8b-8192 | ✅ | ✅ | ➖ | ➖ | ➖ | ➖ |
| llama3-70b-8192 | ✅ | ✅ | ✅ | ➖ | ➖ | ➖ |
| mixtral-8x7b-32768 | ✅ | ✅ | ➖ | ➖ | ➖ | ➖ |
| gemma-7b-it | ✅ | ✅ | ✅ | ➖ | ➖ | ➖ |
| gemma2-9b-it | ✅ | ✅ | ✅ | ➖ | ➖ | ➖ |

### Legend
| Symbol | Description |
Expand Down
14 changes: 5 additions & 9 deletions docs/providers/perplexity.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,11 @@ main()
<!-- compatibility -->
## Supported Models

| Model | Chat Completion | Streaming | JSON Output | Image Input | Function Calling | N > 1 |
| ------------------------------ | --------------- | --------- | ----------- | ----------- | ---------------- | ----- |
| llama-3-sonar-small-32k-chat | ✅ | ✅ | ➖ | ➖ | ➖ | ➖ |
| llama-3-sonar-small-32k-online | ✅ | ✅ | ➖ | ➖ | ➖ | ➖ |
| llama-3-sonar-large-32k-chat | ✅ | ✅ | ➖ | ➖ | ➖ | ➖ |
| llama-3-sonar-large-32k-online | ✅ | ✅ | ➖ | ➖ | ➖ | ➖ |
| llama-3-8b-instruct | ✅ | ✅ | ➖ | ➖ | ➖ | ➖ |
| llama-3-70b-instruct | ✅ | ✅ | ➖ | ➖ | ➖ | ➖ |
| mixtral-8x7b-instruct | ✅ | ✅ | ➖ | ➖ | ➖ | ➖ |
| Model | Chat Completion | Streaming | JSON Output | Image Input | Function Calling | N > 1 |
| --------------------------------- | --------------- | --------- | ----------- | ----------- | ---------------- | ----- |
| llama-3.1-sonar-small-128k-online | ✅ | ✅ | ➖ | ➖ | ➖ | ➖ |
| llama-3.1-sonar-large-128k-online | ✅ | ✅ | ➖ | ➖ | ➖ | ➖ |
| llama-3.1-sonar-huge-128k-online | ✅ | ✅ | ➖ | ➖ | ➖ | ➖ |

### Legend
| Symbol | Description |
Expand Down
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { LLMChat } from './chat/index.js'
import { ConfigOptions } from './userTypes/index.js'
export * from './models.js'
export * from './userTypes/index.js'

// Extract the public interface from OpenAI, including both properties and methods
Expand Down
32 changes: 17 additions & 15 deletions src/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,8 @@ export const models = {
},
groq: {
models: [
'llama-3.3-70b-versatile',
'llama-3.1-8b-instant',
'llama3-8b-8192',
'llama3-70b-8192',
'mixtral-8x7b-32768',
Expand All @@ -372,6 +374,8 @@ export const models = {
] as const,
supportsCompletion: true,
supportsStreaming: [
'llama-3.3-70b-versatile',
'llama-3.1-8b-instant',
'llama3-8b-8192',
'llama3-70b-8192',
'mixtral-8x7b-32768',
Expand All @@ -382,31 +386,29 @@ export const models = {
// produce valid JSON or produce very low quality results for the following prompt: "Generate a
// JSON that maps ten athletes to their jersey numbers". We removed these models from the list
// to ensure that we only support models that reliably produce decent results.
supportsJSON: ['llama3-70b-8192', 'gemma-7b-it', 'gemma2-9b-it'] as const,
supportsJSON: [
'llama-3.3-70b-versatile',
'llama-3.1-8b-instant',
'llama3-70b-8192',
'gemma-7b-it',
'gemma2-9b-it',
] as const,
supportsImages: [] as const,
supportsToolCalls: [] as const,
supportsN: false,
generateDocs: true,
},
perplexity: {
models: [
'llama-3-sonar-small-32k-chat',
'llama-3-sonar-small-32k-online',
'llama-3-sonar-large-32k-chat',
'llama-3-sonar-large-32k-online',
'llama-3-8b-instruct',
'llama-3-70b-instruct',
'mixtral-8x7b-instruct',
'llama-3.1-sonar-small-128k-online',
'llama-3.1-sonar-large-128k-online',
'llama-3.1-sonar-huge-128k-online',
] as const,
supportsCompletion: true,
supportsStreaming: [
'llama-3-sonar-small-32k-chat',
'llama-3-sonar-small-32k-online',
'llama-3-sonar-large-32k-chat',
'llama-3-sonar-large-32k-online',
'llama-3-8b-instruct',
'llama-3-70b-instruct',
'mixtral-8x7b-instruct',
'llama-3.1-sonar-small-128k-online',
'llama-3.1-sonar-large-128k-online',
'llama-3.1-sonar-huge-128k-online',
] as const,
supportsJSON: [] as const,
supportsImages: [] as const,
Expand Down