Skip to content
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

chore: update models in texts and tests #62

Merged
merged 1 commit into from
Nov 10, 2023
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
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ The following example showcases how you can integrate GenAI into your project.
import { GenAIModel } from '@ibm-generative-ai/node-sdk/langchain';

const model = new GenAIModel({
modelId: 'google/ul2',
modelId: 'google/flan-ul2',
parameters: {},
configuration: {
apiKey: 'pak-.....',
Expand Down Expand Up @@ -222,7 +222,7 @@ console.log(text); // ArcticAegis
import { GenAIModel } from '@ibm-generative-ai/node-sdk/langchain';

const model = new GenAIModel({
modelId: 'google/ul2',
modelId: 'google/flan-ul2',
stream: true,
parameters: {},
configuration: {
Expand All @@ -245,7 +245,7 @@ await model.call('Tell me a joke.', undefined, [
import { GenAIChatModel } from '@ibm-generative-ai/node-sdk/langchain';

const client = new GenAIChatModel({
modelId: 'togethercomputer/gpt-neoxt-chat-base-20b',
modelId: 'eleutherai/gpt-neox-20b',
stream: false,
configuration: {
endpoint: process.env.ENDPOINT,
Expand Down
4 changes: 2 additions & 2 deletions examples/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const client = new Client({
apiKey: process.env.GENAI_API_KEY,
});

const model_id = 'google/ul2';
const model_id = 'google/flan-ul2';

{
// Start a conversation
Expand Down Expand Up @@ -69,7 +69,7 @@ const model_id = 'google/ul2';
// Streaming callbacks
client.chat(
{
model_id: 'google/ul2',
model_id: 'google/flan-ul2',
messages: [{ role: 'user', content: 'How are you?' }],
},
{ stream: true },
Expand Down
2 changes: 1 addition & 1 deletion examples/langchain/llm-chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { GenAIChatModel } from '../../src/langchain/llm-chat.js';

const makeClient = (stream?: boolean) =>
new GenAIChatModel({
modelId: 'togethercomputer/gpt-neoxt-chat-base-20b',
modelId: 'eleutherai/gpt-neox-20b',
stream,
configuration: {
endpoint: process.env.ENDPOINT,
Expand Down
12 changes: 6 additions & 6 deletions src/tests/e2e/client.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ describe('client', () => {
const makeValidStream = (parameters: Record<string, any> = {}) =>
client.generate(
{
model_id: 'google/ul2',
model_id: 'google/flan-ul2',
input: 'Hello, World',
parameters: {
max_new_tokens: 10,
Expand Down Expand Up @@ -89,11 +89,11 @@ describe('client', () => {
client.generate(
[
{
model_id: 'google/ul2',
model_id: 'google/flan-ul2',
input: 'Hello, World',
},
{
model_id: 'google/ul2',
model_id: 'google/flan-ul2',
input: 'Hello, World',
},
] as unknown as GenerateInput,
Expand Down Expand Up @@ -153,7 +153,7 @@ describe('client', () => {
const chunks: GenerateOutput[] = [];
client.generate(
{
model_id: 'google/ul2',
model_id: 'google/flan-ul2',
input: 'Hello, World',
parameters: {},
},
Expand Down Expand Up @@ -215,7 +215,7 @@ describe('client', () => {
const makeValidStream = () =>
client.chat(
{
model_id: 'google/ul2',
model_id: 'google/flan-ul2',
messages: [{ role: 'user', content: 'Hello World!' }],
},
{
Expand Down Expand Up @@ -246,7 +246,7 @@ describe('client', () => {
const chunks: ChatOutput[] = [];
client.chat(
{
model_id: 'google/ul2',
model_id: 'google/flan-ul2',
messages: [{ role: 'user', content: 'Hello World!' }],
},
{
Expand Down
2 changes: 1 addition & 1 deletion src/tests/e2e/langchain/llm-chat.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ describeIf(process.env.RUN_LANGCHAIN_CHAT_TESTS === 'true')(
() => {
const makeClient = (stream?: boolean) =>
new GenAIChatModel({
modelId: 'togethercomputer/gpt-neoxt-chat-base-20b',
modelId: 'eleutherai/gpt-neox-20b',
stream,
configuration: {
endpoint: process.env.ENDPOINT,
Expand Down
4 changes: 2 additions & 2 deletions src/tests/integration/client.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ describe('client', () => {

test('should replace the config', async () => {
const input = {
model_id: 'google/ul2',
model_id: 'google/flan-ul2',
parameters: {
decoding_method: 'greedy',
random_seed: 8,
Expand All @@ -98,7 +98,7 @@ describe('client', () => {

test('should set and reset the config', async () => {
const input = {
model_id: 'google/ul2',
model_id: 'google/flan-ul2',
parameters: {
decoding_method: 'greedy',
random_seed: 8,
Expand Down