Skip to content

Commit

Permalink
Vector: add support for OpenAI embedding
Browse files Browse the repository at this point in the history
  • Loading branch information
fwang committed Jan 18, 2024
1 parent fa43074 commit 3da3181
Show file tree
Hide file tree
Showing 6 changed files with 539 additions and 33 deletions.
12 changes: 3 additions & 9 deletions examples/playground/sst.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ export default $config({
},
async run() {
const vector = new sst.Vector("MyVectorDB", {
model: "amazon.titan-embed-image-v1",
//model: "amazon.titan-embed-image-v1",
model: "text-embedding-ada-002",
});

const seeder = new sst.Function("Seeder", {
Expand Down Expand Up @@ -48,13 +49,6 @@ export default $config({
url: true,
});

const abc = new sst.Function("ABC", {
bundle: "functions/bundled-example",
handler: "index.handler",
link: [vector],
url: true,
});

return { seeder: seeder.url, app: app.url, abc: abc.url };
return { seeder: seeder.url, app: app.url };
},
});
Loading

0 comments on commit 3da3181

Please sign in to comment.