Skip to content

Commit

Permalink
chore: qwerty
Browse files Browse the repository at this point in the history
  • Loading branch information
GermanVor committed Dec 15, 2024
1 parent 1bddaa9 commit 7da73cd
Showing 3 changed files with 22 additions and 16 deletions.
18 changes: 12 additions & 6 deletions clients/ai-assistants-v1/sdk/assistantSdk.ts
Original file line number Diff line number Diff line change
@@ -10,19 +10,25 @@ import {
} from '../generated/yandex/cloud/ai/assistants/v1/assistant_service';
import { ClientCallArgs, SessionArg, TypeFromProtoc } from './types';

type CreateAssistantProps = Omit<TypeFromProtoc<CreateAssistantRequest, 'folderId'>, 'modelUri'> & {
export type CreateAssistantProps = Omit<
TypeFromProtoc<CreateAssistantRequest, 'folderId'>,
'modelUri'
> & {
modelId: string;
};

type GetAssistantProps = TypeFromProtoc<GetAssistantRequest, 'assistantId'>;
export type GetAssistantProps = TypeFromProtoc<GetAssistantRequest, 'assistantId'>;

type ListAssistantProps = TypeFromProtoc<ListAssistantsRequest, 'folderId'>;
export type ListAssistantProps = TypeFromProtoc<ListAssistantsRequest, 'folderId'>;

type DeleteAssistantProps = TypeFromProtoc<DeleteAssistantRequest, 'assistantId'>;
export type DeleteAssistantProps = TypeFromProtoc<DeleteAssistantRequest, 'assistantId'>;

type ListAssistantVersionsProps = TypeFromProtoc<ListAssistantVersionsRequest, 'assistantId'>;
export type ListAssistantVersionsProps = TypeFromProtoc<
ListAssistantVersionsRequest,
'assistantId'
>;

type UpdateAssistantProps = TypeFromProtoc<UpdateAssistantRequest, 'assistantId'>;
export type UpdateAssistantProps = TypeFromProtoc<UpdateAssistantRequest, 'assistantId'>;

export const assistantWithSdk = <T extends Pick<Assistant, 'id'>>(
session: SessionArg,
10 changes: 5 additions & 5 deletions clients/ai-assistants-v1/sdk/runSdk.ts
Original file line number Diff line number Diff line change
@@ -11,15 +11,15 @@ import { Run } from '../generated/yandex/cloud/ai/assistants/v1/runs/run';
import { CallOptions } from '@grpc/grpc-js';
import { runService } from '..';

type GetRunProps = TypeFromProtoc<GetRunRequest, 'runId'>;
export type GetRunProps = TypeFromProtoc<GetRunRequest, 'runId'>;

type CreateRunProps = TypeFromProtoc<CreateRunRequest, 'threadId' | 'assistantId'>;
export type CreateRunProps = TypeFromProtoc<CreateRunRequest, 'threadId' | 'assistantId'>;

type GetLastRunByThreadProps = TypeFromProtoc<GetLastRunByThreadRequest, 'threadId'>;
export type GetLastRunByThreadProps = TypeFromProtoc<GetLastRunByThreadRequest, 'threadId'>;

type ListRunsProps = TypeFromProtoc<ListRunsRequest, 'folderId'>;
export type ListRunsProps = TypeFromProtoc<ListRunsRequest, 'folderId'>;

type ListenRunProps = TypeFromProtoc<ListenRunRequest, 'runId' | 'eventsStartIdx'>;
export type ListenRunProps = TypeFromProtoc<ListenRunRequest, 'runId' | 'eventsStartIdx'>;

export const runWithSdk = <T extends Pick<Run, 'id'>>(
session: SessionArg,
10 changes: 5 additions & 5 deletions clients/ai-assistants-v1/sdk/threadSdk.ts
Original file line number Diff line number Diff line change
@@ -16,15 +16,15 @@ import {
} from './messageSdk';
import { ClientCallArgs, SessionArg, TypeFromProtoc } from './types';

type CreateThreadProps = TypeFromProtoc<CreateThreadRequest, 'folderId' | 'name'>;
export type CreateThreadProps = TypeFromProtoc<CreateThreadRequest, 'folderId' | 'name'>;

type GetThreadProps = TypeFromProtoc<GetThreadRequest, 'threadId'>;
export type GetThreadProps = TypeFromProtoc<GetThreadRequest, 'threadId'>;

type ListThreadProps = TypeFromProtoc<ListThreadsRequest, 'folderId'>;
export type ListThreadProps = TypeFromProtoc<ListThreadsRequest, 'folderId'>;

type DeleteThreadProps = TypeFromProtoc<DeleteThreadRequest, 'threadId'>;
export type DeleteThreadProps = TypeFromProtoc<DeleteThreadRequest, 'threadId'>;

type UpdateThreadProps = TypeFromProtoc<UpdateThreadRequest, 'threadId'>;
export type UpdateThreadProps = TypeFromProtoc<UpdateThreadRequest, 'threadId'>;

export const threadWithSdk = <T extends Pick<Thread, 'id'>>(
session: SessionArg,

0 comments on commit 7da73cd

Please sign in to comment.