Commit Graph

14 Commits

Author SHA1 Message Date
Meng Zhang
b76a10144e
refactor(core): restructure CodeGeneration, CompletionStream, ChatCompletionStream (#1998)
* refactor(core): remove generate method from TextGeneration

* refactor out TextGeneration struct

* eliminate chat sub module

* refactor: extract CompletionStream

* restruct ChatCompletionStream <-> CompletionStream

* restruct with CodeGeneration

* handle output limitation inside of Stream traits
2024-04-29 00:24:46 +00:00
Meng Zhang
f0632e6909
fix(webserver): validation should always comes with message field (#1981) 2024-04-26 20:43:17 +00:00
Meng Zhang
62397959a5
ci: add lint to check around all DateTime<Utc> usage in tabby-db (#1952)
* ci: add lint to warning around all DateTime<Utc> usage in tabby-db

* update

* update

* fix unit test

* update
2024-04-24 21:49:09 +00:00
Meng Zhang
3af843341a
refactor(core): use TextGeneration interface for LLM consumption (#1928) 2024-04-22 23:44:03 +00:00
Meng Zhang
5acc26dbb0
refactor(webserver): always use schema::Result for graphql api responses (#1892) 2024-04-18 11:07:08 -07:00
boxbeam
8af645bcaf
feat(webserver): Log completion events to database (#1571)
* add user completions draft

* [autofix.ci] apply automated fixes

* feat(db): Create DAO for user completion logging (#1514)

* feat(db): Create DAO for user completion logging

* Apply suggestions

* Remove todo

* Apply suggestions

* test(webserver): Create test for user completions (#1523)

* test(webserver): Create test for user completions

* Utility function to sleep 50ms

* Delete ee/tabby-webserver/src/service/logger.rs

* Update ee/tabby-webserver/src/service/mod.rs

* [autofix.ci] apply automated fixes

* Apply suggestion

* Fix test

* Add test cases for missing or invalid user

* Add test for chat completion event

* Apply suggestions

* feat(webserver): Use db logger for chat completions

* Make webserver non-optional dependency

* Restructure code to not depend on webserver unconditionally

* Move dep back

* Fixes for conflicts

* Change to use IDs instead of emails

* Use db logger for webserver

* Remove bound from EventLogger

* [autofix.ci] apply automated fixes

* Create raw event logger wrapper

* Apply suggestions

* [autofix.ci] apply automated fixes

* Fix event logging

* Apply suggestions

* Make new_event_logger non-public

* Make import feature-gated

* [autofix.ci] apply automated fixes

* Apply suggestion

* Hopefully fix tests

* Apply suggestions

* Fix compile error

---------

Co-authored-by: Meng Zhang <meng@tabbyml.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-03-13 00:53:18 +08:00
Meng Zhang
ccf332177a
refactor(ui): switch to CoreError for all services API consumed by GraphQL (#1515)
* refactor out RepositoryError

* switch auth service to CoreError

* migrate email to schema::Result

* migrate job to schema::Result

* migrate license to schema::Result

* migrate worker to schema::Result

* migrate repository to schema::Result

* migrate settings to schema::Result

* refactor out SendEmailError

* fix error converstion

* simplify return value

* fix

* add lint rule use-schema-result

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-02-22 21:22:37 -08:00
Meng Zhang
3db3d95eae
ci: add validation to requires code field being set for form validations (#1454) 2024-02-14 09:27:03 -08:00
boxbeam
256126a1f6
fix(core): Change to clippy lint (#1428) 2024-02-09 14:43:02 -08:00
Meng Zhang
53065f32a6
Revert "fix(core): Change to clippy lint (#1425)" (#1427)
This reverts commit fa866516c7.

Co-authored-by: boxbeam <instantiable@gmail.com>
2024-02-09 12:26:28 -08:00
boxbeam
fa866516c7
fix(core): Change to clippy lint (#1425) 2024-02-09 11:28:39 -08:00
Meng Zhang
ee92a9f1c3
test: add lint to avoid unwrap (#1422)
* test: add lint to avoid unwrap

* update

* Update crates/tabby-inference/src/lib.rs

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-02-09 11:19:01 -08:00
Meng Zhang
5527e3f7bb
refactor(webserver): use ID in service api (#1416) 2024-02-08 02:10:36 -08:00
Meng Zhang
2fd2a12bd3
refactor(webserver): ensure only services could rely on tabby_db dire… (#1407)
* refactor(webserver): ensure only services could rely on tabby_db directly

* update

* update

* update

* update

* update

* update

* update

* update
2024-02-07 19:15:53 +00:00