Skip to content

Instantly share code, notes, and snippets.

View yharaskrik's full-sized avatar

Jay Bell yharaskrik

View GitHub Profile
import { TensorFlowEmbeddings } from '@langchain/community/embeddings/tensorflow';
import {
ChatPromptTemplate,
HumanMessagePromptTemplate,
SystemMessagePromptTemplate,
} from '@langchain/core/prompts';
import { ChatOpenAI } from '@langchain/openai';
import '@tensorflow/tfjs-node';
import { config } from 'dotenv';
import { MemoryVectorStore } from 'langchain/vectorstores/memory';
@yharaskrik
yharaskrik / example.ts
Created August 20, 2023 22:13
Bull Graceful Shutdown NestJS
import { BullModule } from '@nestjs/bull';
import { Module } from '@nestjs/common';
import { QueueGracefulShutdown } from './queue-graceful-shutdown';
const QUEUE_NAME = 'my-queue';
@Module({
imports: [
BullModule.registerQueue({
name: QUEUE_NAME,
@yharaskrik
yharaskrik / my.store.ts
Created July 12, 2022 05:38
component store 14.0.1 typing issue
interface SomeType {
name: string;
prop: string;
}
export abstract class MyStore<
QueryVariables extends SomeType
> extends ComponentStore<any> {
protected abstract readonly query$: Observable<Omit<QueryVariables, 'name'>>;