Skip to content

Commit

Permalink
remote client id form usecases ( browser side)
Browse files Browse the repository at this point in the history
  • Loading branch information
maany committed Aug 11, 2024
1 parent 4db5113 commit c7ddb6e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { z } from 'zod'
import { MessageSchema } from '../entity/kernel-models'

export const SendMessageToConversationRequestSchema = z.object({
clientID: z.string(),
researchContextID: z.string(),
conversationID: z.string(),
message: MessageSchema,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default class BrowserSendMessageToConversationUseCase implements SendMess
return;
}

const prepareMessageDTO = await this.agentGateway.prepareMessageContext(request.clientID, request.researchContextID, request.conversationID, request.message)
const prepareMessageDTO = await this.agentGateway.prepareMessageContext(request.researchContextID, request.conversationID, request.message)
if (!prepareMessageDTO.success) {
this.presenter.presentError(
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { injectable } from "inversify";
import { TCreateVectorStoreDTO, TGetVectorStoreDTO, TDeleteVectorStoreDTO } from "~/lib/core/dto/vector-store-dto";
import { RemoteFile } from "~/lib/core/entity/file";
import VectorStoreOutputPort from "~/lib/core/ports/secondary/vector-store-output-port";

@injectable()
export default class BrowserVectorStoreGateway implements VectorStoreOutputPort {
createVectorStore(research_context_id: number, fileIDs: string[]): Promise<TCreateVectorStoreDTO> {
createVectorStore(research_context_id: number, files: RemoteFile[]): Promise<TCreateVectorStoreDTO> {
throw new Error("Method not implemented.");
}
getVectorStore(research_context_id: number): Promise<TGetVectorStoreDTO> {
Expand All @@ -14,4 +15,5 @@ export default class BrowserVectorStoreGateway implements VectorStoreOutputPort
throw new Error("Method not implemented.");
}


}
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { injectable } from "inversify";
import { TCreateVectorStoreDTO, TGetVectorStoreDTO, TDeleteVectorStoreDTO } from "~/lib/core/dto/vector-store-dto";
import { RemoteFile } from "~/lib/core/entity/file";
import VectorStoreOutputPort from "~/lib/core/ports/secondary/vector-store-output-port";

@injectable()
export default class OpenAIVectorStoreGateway implements VectorStoreOutputPort {
createVectorStore(research_context_id: number, fileIDs: string[]): Promise<TCreateVectorStoreDTO> {
createVectorStore(research_context_id: number, files: RemoteFile[]): Promise<TCreateVectorStoreDTO> {
throw new Error("Method not implemented.");
}
getVectorStore(research_context_id: number): Promise<TGetVectorStoreDTO> {
Expand All @@ -13,5 +14,4 @@ export default class OpenAIVectorStoreGateway implements VectorStoreOutputPort {
deleteVectorStore(research_context_id: number): Promise<TDeleteVectorStoreDTO> {
throw new Error("Method not implemented.");
}

}

0 comments on commit c7ddb6e

Please sign in to comment.