0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-25 02:31:30 +01:00
Commit Graph

7 Commits

Author SHA1 Message Date
David Newell
a9496eace8
chore: count tokens before hitting OpenAI (#20621)
* chore: count tokens before hitting OpenAI

* log the offending input

---------

Co-authored-by: Paul D'Ambra <paul@posthog.com>
2024-02-28 23:04:43 +00:00
Paul D'Ambra
5e89d9124a
chore: even more logging (#20612)
* chore: even more embeddings logging

* and more settings

* fix

* fix
2024-02-28 21:24:39 +00:00
David Newell
c09812e1b4
chore: add better logs to embeddings (#20582) 2024-02-27 17:36:58 +00:00
David Newell
125d4e8a3e
feat: embeddings similarity (#20268) 2024-02-21 13:34:11 +00:00
Paul D'Ambra
12b685a22d
chore: better buckets for timings (#20362) 2024-02-15 12:29:00 +00:00
Paul D'Ambra
3e23550b93
fix: don't load recordings we know we'll skip (#20360)
* fix: don't load recordings we know we'll skip

* fix
2024-02-15 12:18:45 +00:00
David Newell
4f6d9c8673
feat: generate recording text embeddings (#20046)
* make migration

* general flow

* abstract shared methods

* generate input

* remove postgres migration

* generate embedding strings

* remove random file

* Update query snapshots

* Update query snapshots

* feat: create periodic replay embedding

* first sketch of table

* batch and flush embeddings

* add default to timestamp generation

* fetch recordings query

* save first embeddings to CH

* dump session metadata into tokens

* fix lint

* brain dump to help th future traveller

* prom timing instead

* fix input concatenation

* add an e :/

* obey mypy

* some time limits to reduce what we query

* a little fiddling to get it to run locally

* paging and counting

* Update query snapshots

* Update query snapshots

* move the AI stuff to EE for now

* Update query snapshots

* kick off the task with interval from settings

* push embedding generation onto its own queue

* on a different queue

* EE to the max

* doh

* fix

* fangling

* Remove clashes so we can merge this into the other PR

* Remove clashes so we can merge this into the other PR

* start wiring up Celery task

* hmmm

* it's a chord

* wire up celery simple version

* rename

* why is worker failing

* Update .run/Celery.run.xml

* update embedding input to remove duplicates

* ttl on the table

* Revert "update embedding input to remove duplicates"

This reverts commit 9a09d9c9f0.

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Paul D'Ambra <paul@posthog.com>
2024-02-14 12:50:42 +00:00