-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Will it support typescript? #2
Comments
Hi @devilyouwei, added code for generating declaration files in the typescript branch, but they don't appear to be needed for new TypeScript projects ( Also, I'm not sure how to reproduce the |
Hi @ankane, actually, I am using I find a more simple approach to use VECTOR, directly using the string type, as the following TS code (egg.js Model): import { Table, Column, AutoIncrement, PrimaryKey, Model, DataType, Sequelize } from 'sequelize-typescript'
// import pgvector from 'pgvector/sequelize'
// pgvector.registerType(Sequelize)
@Table({ modelName: 'page' })
export class Page extends Model {
@PrimaryKey
@AutoIncrement
@Column({
type: DataType.INTEGER
})
id: number
@Column({
type: DataType.INTEGER
})
page: number
@Column({
type: DataType.INTEGER
})
resourceId: number
@Column({
type: 'VECTOR(1536)'
})
embedding: string
@Column({
type: DataType.TEXT
})
content: string
}
export default () => Page Thank you @ankane |
fwiw, |
@ankane when I do to register a type to pg client
I have in my WebStorm IDE and error
but there is no |
Just pushed 0.1.1, which includes types. Note: |
I'm trying this now and I don't believe the types are included in the actual package file. I tried to fix it with local linking the package and I made this change to make it work better #3 |
It seems like more than one person struggle with the issue, and it is not always an (easy) option to just migrate to |
I am using node.js with TypeScript. I got an issue that DataTypes.VECTOR does not exist even if using registerType(Sequelize). Also, I will use an ORM which can cause more issues when DataType is not supported.
The text was updated successfully, but these errors were encountered: