Skip to content

Commit

Permalink
fix(env): add docker env
Browse files Browse the repository at this point in the history
  • Loading branch information
sd0xdev committed Oct 28, 2023
1 parent 84243bb commit a0ba1a9
Show file tree
Hide file tree
Showing 7 changed files with 1,600 additions and 1,500 deletions.
53 changes: 43 additions & 10 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,50 @@
version: '3.5'
version: '3.8'

services:
mongodb:
image: mongo:6.0
ports: ['27017:27017']
mongo1:
container_name: mongo1
image: mongo:7.0
volumes:
- './docker-data/mongodb-data:/data/db'
- ./docker-data/mongodb-data/data1:/data/db
- ./scripts/rs-init.sh:/scripts/rs-init.sh
networks:
- mongors-network-asgard
ports:
- 27017:27017
links:
- mongo2
- mongo3
restart: always
entrypoint: [ "/usr/bin/mongod", "--bind_ip_all", "--replSet", "dbrs" ]
mongo2:
container_name: mongo2
image: mongo:7.0
volumes:
- ./docker-data/mongodb-data/data2:/data/db
networks:
- mongors-network-asgard
ports:
- 27022:27017
restart: always
entrypoint: [ "/usr/bin/mongod", "--bind_ip_all", "--replSet", "dbrs" ]
mongo3:
container_name: mongo3
image: mongo:7.0
volumes:
- ./docker-data/mongodb-data/data3:/data/db
networks:
- mongors-network-asgard
ports:
- 27023:27017
restart: always
entrypoint: [ "/usr/bin/mongod", "--bind_ip_all", "--replSet", "dbrs" ]
redis:
image: redis:4
image: redis:7
ports: ['6379:6379']
networks:
- mongors-network-asgard
volumes:
- ./docker-data/redis-data:/data
volumes:
mongodb-data:
redis-data:

networks:
mongors-network-asgard:
driver: bridge
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,21 @@ import {
createStructuredOutputChainFromZod,
} from 'langchain/chains/openai_functions';
import { ChatOpenAI } from 'langchain/chat_models/openai';
import { LLMChain } from 'langchain/dist';
import { LLMChain } from 'langchain/chains';
import { z } from 'zod';
import { NestLangChainAIChatOAuth } from '../../interface';
import { BaseFunctionCallOptions } from 'langchain/base_language';
import { BaseChatModel } from 'langchain/chat_models/base';

@Injectable()
export class LangChainProvider {
createStructuredOutputChainFromZod<T extends z.AnyZodObject>(
zodSchema: T,
input: Omit<StructuredOutputChainInput, 'outputSchema'>
): LLMChain<T, ChatOpenAI> {
): LLMChain<
T,
BaseChatModel<BaseFunctionCallOptions> | ChatOpenAI<BaseFunctionCallOptions>
> {
return createStructuredOutputChainFromZod(zodSchema, input);
}

Expand Down
45 changes: 14 additions & 31 deletions migrations.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,43 +2,26 @@
"migrations": [
{
"cli": "nx",
"version": "16.6.0-beta.6",
"description": "Prefix outputs with {workspaceRoot}/{projectRoot} if needed",
"implementation": "./src/migrations/update-15-0-0/prefix-outputs",
"version": "16.8.0-beta.3",
"description": "Escape $ in env variables",
"implementation": "./src/migrations/update-16-8-0/escape-dollar-sign-env-variables",
"package": "nx",
"name": "16.6.0-prefix-outputs"
"name": "16.8.0-escape-dollar-sign-env"
},
{
"cli": "nx",
"version": "16.6.0-beta.0",
"description": "Explicitly set 'updateBuildableProjectDepsInPackageJson' to 'true' in targets that rely on that value as the default.",
"factory": "./src/migrations/update-16-6-0/explicitly-set-projects-to-update-buildable-deps",
"package": "@nx/js",
"name": "explicitly-set-projects-to-update-buildable-deps"
},
{
"cli": "nx",
"version": "16.4.0-beta.8",
"description": "Replace @nx/node:node with @nx/js:node for all project targets",
"implementation": "./src/migrations/update-16-4-0/replace-node-executor",
"package": "@nx/node",
"name": "update-16-4-0-replace-node-executor"
"version": "16.8.0",
"description": "update-16-8-0-add-ignored-files",
"implementation": "./src/migrations/update-16-8-0-add-ignored-files/update-16-8-0-add-ignored-files",
"package": "@nx/linter",
"name": "update-16-8-0-add-ignored-files"
},
{
"cli": "nx",
"version": "16.4.0-beta.16",
"description": "Update TsConfig target to es2021 and CacheModule if being used. Read more at https://docs.nestjs.com/migration-guide",
"implementation": "./src/migrations/update-16-4-0-cache-manager/nestjs-10-updates",
"package": "@nx/nest",
"name": "update-16-4-0-support-nestjs-10"
},
{
"cli": "nx",
"version": "16.5.0-beta.2",
"description": "Add test-setup.ts to ignored files in production input",
"implementation": "./src/migrations/update-16-5-0/add-test-setup-to-inputs-ignore",
"package": "@nx/jest",
"name": "add-test-setup-to-inputs-ignore"
"version": "16.8.2-beta.0",
"description": "Remove invalid options (strict, noInterop) for ES6 type modules.",
"factory": "./src/migrations/update-16-8-2/update-swcrc",
"package": "@nx/js",
"name": "16-8-2-update-swcrc"
}
]
}
Loading

0 comments on commit a0ba1a9

Please sign in to comment.