Skip to content

Commit

Permalink
Code added for embeddings in hyde-example
Browse files Browse the repository at this point in the history
  • Loading branch information
Harsh4902 committed Sep 25, 2023
1 parent 8ddac6e commit 9d9e2a2
Show file tree
Hide file tree
Showing 6 changed files with 334 additions and 93 deletions.
12 changes: 12 additions & 0 deletions JS/edgechains/examples/ormconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"type": "postgres",
"host": "db.rmzqtepwnzoxgkkzjctt.supabase.co",
"port": 5432,
"username": "postgres",
"password": "xaX0MYcf1YiJlChK",
"database": "postgres",
"entities": ["dist/entities/**/*.js"],
"synchronize": false,
"logging": false
}

140 changes: 140 additions & 0 deletions JS/edgechains/examples/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion JS/edgechains/examples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"author": "",
"private": true,
"license": "UNLICENSED",

"scripts": {
"build": "nest build",
"clean": "rm -rf coverage dist .nyc_output",
Expand All @@ -27,6 +26,7 @@
"@nestjs/core": "^10.0.0",
"@nestjs/platform-express": "^10.0.0",
"@nestjs/typeorm": "^10.0.0",
"pg": "^8.11.3",
"reflect-metadata": "^0.1.13",
"rxjs": "^7.8.1"
},
Expand Down
3 changes: 2 additions & 1 deletion JS/edgechains/examples/src/app.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@ export class AppController {
}

@Post("/hyde-search")
hydeSearch(@Query() params:any, @Body() query:string){
hydeSearch(@Query() params:any, @Body('query') query: string){
const arkRequest = {
tableName : params.table,
nameSpace : params.namespace,
query : query,
topK : params.topK
}

hydeSearchAdaEmbedding(arkRequest);

}
Expand Down
Loading

0 comments on commit 9d9e2a2

Please sign in to comment.