Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
tomfrenken committed Sep 13, 2024
1 parent 43a4db8 commit 1902dec
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
4 changes: 1 addition & 3 deletions packages/langchain/src/openai/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ import type {
OpenAIChatInput,
OpenAIEmbeddingsParams
} from '@langchain/openai';
import type {
OpenAiChatCompletionParameters,
} from '@sap-ai-sdk/foundation-models';
import type { OpenAiChatCompletionParameters } from '@sap-ai-sdk/foundation-models';
import type {
AzureOpenAiChatModel,
AzureOpenAiEmbeddingModel
Expand Down
15 changes: 12 additions & 3 deletions packages/langchain/src/openai/util.test.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
// mapResponseToChatResult
// mapLangchainToAiClient

import { OpenAiChatClient as OpenAiChatClientBase, OpenAiChatCompletionOutput } from '@sap-ai-sdk/foundation-models';
import {
OpenAiChatClient as OpenAiChatClientBase,
OpenAiChatCompletionOutput
} from '@sap-ai-sdk/foundation-models';
import { jest } from '@jest/globals';
import nock from 'nock';
import { HumanMessage } from '@langchain/core/messages';
import { mockClientCredentialsGrantCall, mockInference, parseMockResponse } from '../../../../test-util/mock-http.js';
import {
mockClientCredentialsGrantCall,
mockInference,
parseMockResponse
} from '../../../../test-util/mock-http.js';
import { mapResponseToChatResult } from './util.js';
import { OpenAiChatClient } from './chat.js';

Expand Down Expand Up @@ -35,7 +42,9 @@ const prompt = {
frequency_penalty: 0
};

const langchainPrompt = new HumanMessage('Where is the deepest place on earth located');
const langchainPrompt = new HumanMessage(
'Where is the deepest place on earth located'
);

const request = {
frequency_penalty: 0,
Expand Down

0 comments on commit 1902dec

Please sign in to comment.