Skip to content

Commit

Permalink
Export more types
Browse files Browse the repository at this point in the history
  • Loading branch information
arshad-yaseen committed Sep 15, 2024
1 parent 53bc88a commit c14ed35
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
3 changes: 3 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ export type {
RegisterCopilotOptions,
CopilotRegistration,
CopilotOptions,
CustomModel,
CustomModelConfig,
CustomModelTransformResponse,
CompletionMetadata,
CompletionRequest,
CompletionRequestBody,
Expand Down
6 changes: 4 additions & 2 deletions src/types/copilot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export type CustomModel = {
* text to be inserted or used as the completion, without
* any metadata or additional structure.
*/
transformResponse: CustomModelResponse;
transformResponse: CustomModelTransformResponse;
};

export type CustomModelConfig = (
Expand All @@ -85,7 +85,9 @@ export type CustomModelConfig = (
body?: Record<string, unknown>;
};

export type CustomModelResponse = (response: unknown) => CompletionResponse;
export type CustomModelTransformResponse = (
response: unknown,
) => CompletionResponse;

export type Endpoint = string;
export type Filename = string;
Expand Down
6 changes: 1 addition & 5 deletions tests/provider-handlers.test.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
import {describe, expect, it} from 'vitest';

import {parseProviderChatCompletion} from '../src/helpers/provider';
import {
ChatCompletion,
CompletionProvider,
PickChatCompletion,
} from '../src/types';
import {ChatCompletion, PickChatCompletion} from '../src/types';

describe('Provider Handler Functions', () => {
describe('parseProviderChatCompletion', () => {
Expand Down

0 comments on commit c14ed35

Please sign in to comment.