How to select from a function with parameters?

I understand that kysely will not natively support stored procedures / functions, and was wondering if there's a pattern for this:
select * from function_name(<parameters>)

I created a helper:
export function similaritySearch(
  text: string,
  model: string,
) {
  return sql`similarity_search(${sql.lit(text)}, ${sql.lit(model)})`;

But, I'm not exactly sure how I can use that since db.selectFrom() expects a table name.
is this what you're looking for?
const result = await sql<Person[]>`select * from person`.execute(db)
Thanks. I think this might work:

export function similaritySearch(text: string, model: string) {
  return sql<SimilaritySearchTable>`similarity_search(${sql.lit(text)}, ${sql.lit(model)})`;

await sql<SimilaritySearchRow[]>`SELECT * FROM ${similaritySearch(text, model)}`.execute(db);