Skip to content

Commit c348f52

Browse files
authored
Merge pull request #62 from token-js/pate/commonjs-chalk
docs: Fix type error in docs
2 parents 5ffe2d9 + 595533e commit c348f52

File tree

13 files changed

+22
-33
lines changed

13 files changed

+22
-33
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,21 +43,21 @@ const messages: ChatCompletionMessageParam[] = [
4343
]
4444

4545
// Call OpenAI
46-
const result: ChatCompletionMessageParam[] = await tokenjs.chat.completions.create({
46+
const result = await tokenjs.chat.completions.create({
4747
provider: 'openai',
4848
model: 'gpt-4o',
4949
messages,
5050
})
5151

5252
// Call Gemini
53-
const result: ChatCompletionMessageParam[] = await tokenjs.chat.completions.create({
53+
const result = await tokenjs.chat.completions.create({
5454
provider: 'gemini',
5555
model: 'gemini-1.5-pro',
5656
messages,
5757
})
5858

5959
// Call Anthropic
60-
const result: ChatCompletionMessageParam[] = await tokenjs.chat.completions.create({
60+
const result = await tokenjs.chat.completions.create({
6161
provider: 'anthropic',
6262
model: 'claude-2.0',
6363
messages,

docs/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ const messages: ChatCompletionMessageParam = [{
7070
}]
7171

7272
// Call the create function
73-
const result: ChatCompletionMessageParam[] = await tokenjs.chat.completions.create({
73+
const result = await tokenjs.chat.completions.create({
7474
// Specify the target model and provider
7575
provider: 'openai',
7676
model: 'gpt-4o',
@@ -100,7 +100,7 @@ const messages: ChatCompletionMessageParam = [{
100100
}]
101101

102102
// Call the create function
103-
const result: ChatCompletionMessageParam[] = await tokenjs.chat.completions.create({
103+
const result = await tokenjs.chat.completions.create({
104104
// Specify the target model and provider
105105
provider: 'anthropic',
106106
model: 'claude-2.0',
@@ -129,7 +129,7 @@ const messages: ChatCompletionMessageParam = [{
129129
}]
130130

131131
// Call the create function
132-
const result: ChatCompletionMessageParam[] = await tokenjs.chat.completions.create({
132+
const result = await tokenjs.chat.completions.create({
133133
// Specify the target model and provider
134134
provider: 'gemini',
135135
model: 'gemini-1.5-pro',
@@ -160,7 +160,7 @@ const messages: ChatCompletionMessageParam = [{
160160
}]
161161

162162
// Call the create function
163-
const result: ChatCompletionMessageParam[] = await tokenjs.chat.completions.create({
163+
const result = await tokenjs.chat.completions.create({
164164
// Specify the target model and provider
165165
provider: 'bedrock',
166166
model: 'amazon.titan-text-express-v1',
@@ -189,7 +189,7 @@ const messages: ChatCompletionMessageParam = [{
189189
}]
190190

191191
// Call the create function
192-
const result: ChatCompletionMessageParam[] = await tokenjs.chat.completions.create({
192+
const result = await tokenjs.chat.completions.create({
193193
// Specify the target model and provider
194194
provider: 'cohere',
195195
model: 'command-r',
@@ -218,7 +218,7 @@ const messages: ChatCompletionMessageParam = [{
218218
}]
219219

220220
// Call the create function
221-
const result: ChatCompletionMessageParam[] = await tokenjs.chat.completions.create({
221+
const result = await tokenjs.chat.completions.create({
222222
// Specify the target model and provider
223223
provider: 'mistral',
224224
model: 'mistral-large-2402',

docs/providers/ai21.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const messages: ChatCompletionMessageParam = [{
2121
}]
2222

2323
// Call the create function
24-
const result: ChatCompletionMessageParam[] = await tokenjs.chat.completions.create({
24+
const result = await tokenjs.chat.completions.create({
2525
// Specify the target model and provider
2626
provider: 'ai21',
2727
model: 'jamba-instruct',

docs/providers/anthropic.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const messages: ChatCompletionMessageParam = [{
2121
}]
2222

2323
// Call the create function
24-
const result: ChatCompletionMessageParam[] = await tokenjs.chat.completions.create({
24+
const result = await tokenjs.chat.completions.create({
2525
// Specify the target model and provider
2626
provider: 'anthropic',
2727
model: 'claude-2.0',

docs/providers/bedrock.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const messages: ChatCompletionMessageParam = [{
2323
}]
2424

2525
// Call the create function
26-
const result: ChatCompletionMessageParam[] = await tokenjs.chat.completions.create({
26+
const result = await tokenjs.chat.completions.create({
2727
// Specify the target model and provider
2828
provider: 'bedrock',
2929
model: 'amazon.titan-text-express-v1',

docs/providers/cohere.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const messages: ChatCompletionMessageParam = [{
2121
}]
2222

2323
// Call the create function
24-
const result: ChatCompletionMessageParam[] = await tokenjs.chat.completions.create({
24+
const result = await tokenjs.chat.completions.create({
2525
// Specify the target model and provider
2626
provider: 'cohere',
2727
model: 'command-r',

docs/providers/gemini.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const messages: ChatCompletionMessageParam = [{
2121
}]
2222

2323
// Call the create function
24-
const result: ChatCompletionMessageParam[] = await tokenjs.chat.completions.create({
24+
const result = await tokenjs.chat.completions.create({
2525
// Specify the target model and provider
2626
provider: 'gemini',
2727
model: 'gemini-1.5-pro',

docs/providers/groq.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const messages: ChatCompletionMessageParam = [{
2121
}]
2222

2323
// Call the create function
24-
const result: ChatCompletionMessageParam[] = await tokenjs.chat.completions.create({
24+
const result = await tokenjs.chat.completions.create({
2525
// Specify the target model and provider
2626
provider: 'groq',
2727
model: 'llama3-70b-8192',

docs/providers/mistral.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const messages: ChatCompletionMessageParam = [{
2121
}]
2222

2323
// Call the create function
24-
const result: ChatCompletionMessageParam[] = await tokenjs.chat.completions.create({
24+
const result = await tokenjs.chat.completions.create({
2525
// Specify the target model and provider
2626
provider: 'mistral',
2727
model: 'mistral-large-2402',

docs/providers/openai.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const messages: ChatCompletionMessageParam = [{
2121
}]
2222

2323
// Call the create function
24-
const result: ChatCompletionMessageParam[] = await tokenjs.chat.completions.create({
24+
const result = await tokenjs.chat.completions.create({
2525
// Specify the target model and provider
2626
provider: 'openai',
2727
model: 'gpt-4o',

0 commit comments

Comments
 (0)