Skip to content

Commit

Permalink
Update to typescript-native md5 library
Browse files Browse the repository at this point in the history
  • Loading branch information
eob committed Jul 14, 2023
1 parent cdbe353 commit a45f887
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
"eslint-config-next": "13.4.4",
"hnswlib-node": "^1.4.2",
"langchain": "^0.0.92",
"md5": "^2.3.0",
"next": "13.4.4",
"postcss": "8.4.24",
"react": "18.2.0",
Expand All @@ -39,11 +38,11 @@
"react-tooltip": "^5.16.1",
"replicate": "^0.9.3",
"tailwindcss": "3.3.2",
"ts-md5": "^1.3.1",
"twilio": "^4.12.0",
"typescript": "5.1.3"
},
"devDependencies": {
"@flydotio/dockerfile": "^0.2.14",
"@types/md5": "^2.3.2"
"@flydotio/dockerfile": "^0.2.14"
}
}
4 changes: 2 additions & 2 deletions src/app/api/steamship/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import clerk from "@clerk/clerk-sdk-node";
import { NextResponse } from "next/server";
import { currentUser } from "@clerk/nextjs";
import { rateLimit } from "@/app/utils/rateLimit";
import md5 from "md5"
import {Md5} from 'ts-md5'
import ConfigManager from "@/app/utils/config";

dotenv.config({ path: `.env.local` });
Expand Down Expand Up @@ -72,7 +72,7 @@ export async function POST(req: Request) {
}

// Create a chat session id for the user
const chatSessionId = md5(userId || "anonymous");
const chatSessionId = Md5.hashStr(userId || "anonymous");

// Make sure we have a generate endpoint.
// TODO: Create a new instance of the agent per user if this proves advantageous.
Expand Down

0 comments on commit a45f887

Please sign in to comment.