Skip to content
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

Finetuning rest #264

Merged
merged 77 commits into from
May 16, 2024
Merged

Finetuning rest #264

merged 77 commits into from
May 16, 2024

Conversation

antopiahk
Copy link
Member

No description provided.

antopiahk and others added 30 commits April 15, 2024 16:35
* add brave search

* add stackapi tool
* subscriptions

* subscriptions endpoint
…rator (#197)

* fix the type on session

* fix type on message

* fix warning from edge class

* clean up, also fix message model
* Add billing endpoints

* Gitignore cache and change api keys path to kebabcase (#199)

* comment fixes

* change get request for billing info to use path param

---------

Co-authored-by: Leon Nilsson <[email protected]>
Co-authored-by: Leon Lam Nilsson <[email protected]>
* fix error output on inputting session

* fix more error handling in running crew

* delete session if crew run errors

so we don't create sessions with no messages
* add tiers endpoint

* fixing up tier endpoints

* tiers changes

* tier change testing

* changes tier endpoint and def

* def get_tier change

* fixed response

---------

Signed-off-by: Leon Nilsson <[email protected]>
Co-authored-by: Leon Nilsson <[email protected]>
* add tools (untested)

* change api key types endpoint name to kebab case

* add error handling on delete tool

---------

Signed-off-by: Leon Nilsson <[email protected]>
fixed the issues in the code i wrote
* format

* fixup on typing
* remove past gen folder

* packages

* tsconfig

* remove client

* remove api.ts

* create client

* api things

* sessions working like before with new system

* update more from sessions to be using new system, SessionNavigator is working again

* convert more to new system

* update api types

* work on converting crews to use api

* update api types

* work on converting crews

* crews working I think

* prep for tomorrow

* partially convert api keys to new system

* ts

* correct type

* validate session in hook

* uncomment thing I'm gonna work on

* api keys working I think

* update api schema

* work on converting sessions to using new system

* fixup api interactions with new api schema

* api keys kebab case

* get api keys working again again and work on sessions

* update api schema

* working on crews

* delete blog

* finalize delete blog

* work on crew

* update api types

* crews page is running at least now

* remove unused var

* fix sonarcloud issue

* format

* ignore generated file from prettier

* please stop crying sonarcloud
* add new agent model implementation

* change base_model
Bumps the pip group with 1 update in the /apps/api directory: [aiohttp](https://github.com/aio-libs/aiohttp).
Bumps the pip group with 1 update in the /apps/rest/api directory: [aiohttp](https://github.com/aio-libs/aiohttp).

Updates `aiohttp` from 3.9.3 to 3.9.4
- [Release notes](https://github.com/aio-libs/aiohttp/releases)
- [Changelog](https://github.com/aio-libs/aiohttp/blob/master/CHANGES.rst)
- [Commits](aio-libs/aiohttp@v3.9.3...v3.9.4)

Updates `aiohttp` from 3.9.3 to 3.9.4
- [Release notes](https://github.com/aio-libs/aiohttp/releases)
- [Changelog](https://github.com/aio-libs/aiohttp/blob/master/CHANGES.rst)
- [Commits](aio-libs/aiohttp@v3.9.3...v3.9.4)

---
updated-dependencies:
- dependency-name: aiohttp
  dependency-type: direct:production
  dependency-group: pip
- dependency-name: aiohttp
  dependency-type: direct:production
  dependency-group: pip
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* validate crews endpoint

* process crew
* add semi working updating agent and crew relation

idk why but sometimes the supabase requests seem to time out and it
doesnt finish the patch request

* change path params to "id"

* fixup validation
* add endpoint for getting all models

* add return type to db function
* crews before the edges nuke

* working on crews

* update endpoints

* update types again

* work on crews and agents page

* api endpoints

* agent editor working?

* update packages

* try to get agents/ and crews/ pages to follow same methology

* update packages

* creating crews and forms working much better

* update agents page to use shadcn form for creation

* update textarea

* work on agent creation

* crew agent creation and personal library

* implement deletion of agents and crews

* library component

* openinng crews is working
eksno and others added 25 commits May 15, 2024 17:28
* update api types

* Hotfix Agent Editor

* auto signin and bugfixes

* auth, marketing, zod

* trying to fixup crew saving and adding agents

* editing crews fixed
* raise error when less than 0 funds on profile

* change profile not found error
…expectedly (#242)

* add example groupchat with RAG

test version copied from autogen blog

* add gpt-4-turbo model

* add rag test endpoint to my sandbox endpoints

* remove random unused imports

* add test rag class to crew

* start of rag implementation, errors atm

when trying to use the register_for_llm decorator on the
retrieve_content method it breaks, the decorator doesn't seem to work
with that method for some reason. it can't find a "_name" attribute

* add mega primitive implementation of rag

its super scuffed rn bewary before reading

* move rag.py to lib

* gitignore and delete tmp folder

* format (and make task on rag options nullable)

* format again lol

* make retrieve_content a method

* chat result tests

* poetry

* change to using the passed rag options

also removed the extra 0.01 cost when adding cost margin

* make RagOptions nullable

it is being defaulted in the sessions/run endpoint atm

* format

* ignore rag user proxy if use_rag is false (when rag_options is None)

* fixups on bugs etc

* merge didnt work for some reason

* got decently working rag and fixed sessions stopping randomly

* refactor: remove commented code

This commit removes large blocks of commented code from the files'apps/api/src/lib/rag.py' and 'apps/api/src/routers/sandbox/leon.py'.It also rearranges the import statements in 'apps/api/src/lib/crew.py'.This cleanup improves readability and maintainability of the codebase.

* refactor: remove unused function registration

This commit removes the unused function registration in the file
'apps/api/src/routers/sandbox/leon.py'. The function 'function_moment'
was registered but never used. This change improves the clarity of the
code and reduces potential confusion.
- Update authentication methods to include user profile data
- Modify session handling to include user profile data
- Add new API endpoints for user profile retrieval and creation
- Remove old authentication pages and replace with a unified authentication page
- Update navigation links to point to new authentication page
- Add user funding information to the side navigation
- Add message deduplication in session page
- Fix various type errors and misnamed variables"
* feat(SideNav): simplify logout button implementation

The logout button in the SideNav component has been simplified. The
previous implementation used a dynamic list for the bottom navigation,
which was overkill for a single static button. The new implementation
directly includes the logout button in the markup. This makes the code
easier to understand and maintain.

* work on fixing up supabase stuff again

* I really dislike poetry

* authentication is working!

* feat(auth): Change auth redirect and remove callback

This commit changes the redirect URL after authentication from
'auth/callback' to 'app'. The 'auth/callback' route is removed as it's
no longer needed. The logout process is simplified by removing error
handling. The 'code' query parameter is now checked in the layout
server route, and if present, it's used to exchange for a session.
The user data check in the layout component is removed.
Bumps the pip group with 1 update in the /apps/api directory: [tqdm](https://github.com/tqdm/tqdm).


Updates `tqdm` from 4.66.2 to 4.66.3
- [Release notes](https://github.com/tqdm/tqdm/releases)
- [Commits](tqdm/tqdm@v4.66.2...v4.66.3)

---
updated-dependencies:
- dependency-name: tqdm
  dependency-type: indirect
  dependency-group: pip
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps the pip group with 1 update in the /apps/api directory: [tqdm](https://github.com/tqdm/tqdm).
Bumps the pip group with 1 update in the /apps/rest/api directory: [tqdm](https://github.com/tqdm/tqdm).

Updates `tqdm` from 4.66.3 to 4.66.4
- [Release notes](https://github.com/tqdm/tqdm/releases)
- [Commits](tqdm/tqdm@v4.66.3...v4.66.4)

Updates `tqdm` from 4.66.2 to 4.66.3
- [Release notes](https://github.com/tqdm/tqdm/releases)
- [Commits](tqdm/tqdm@v4.66.3...v4.66.4)

---
updated-dependencies:
- dependency-name: tqdm
  dependency-type: indirect
  dependency-group: pip
- dependency-name: tqdm
  dependency-type: indirect
  dependency-group: pip
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…le page (#249)

* feat: display user email in Profile title

The user's email is now displayed in the Profile title on the account
page. This change enhances user experience by providing a more
personalized interface and helps in identifying the active account.

* feat: streamline agent addition and prompt editing

This commit reworks the agent addition process and prompt editing
in the crew panel. It fixes issues with adding agents to the crew.
The prompt node has been removed and replaced with a prompt editor
in the crew panel.

* fix: remove duplicate Tabs.Content tag in account page

This commit removes a duplicate Tabs.Content tag in the account page
svelte component. This was causing unnecessary nesting and potential
layout issues. The fix ensures proper rendering of the account page.
* fix: agent creation

* fix: agent banner color
This commit adds error handling for the crew saving operation in the
CrewPanel component. In case of an error, it logs the error to the
console and displays an error message to the user. This ensures that
failures in saving a crew are properly communicated to the user and
developers.
The application now tries to get the PORT from the environment variables.
If it's not found, it logs an info message and uses the default PORT=80.
If the PORT is not an integer, it raises a ValueError.
* change formatter from using poetry

* format
Set the receiver_id to 000...000 because it's required by the api.
* feat(improver): add cost calculation and logging

This commit introduces cost calculation and logging to the
`improve_prompt` function. It also modifies the function to
retrieve the profile from the database and update the funding
after the cost calculation. The function now raises an HTTP
exception if the profile is not found or if the result object
from OpenAI is unusual. The `improve` route in the router has
been changed from a GET to a POST method and now uses the
`ImproveInsertRequest` model for its request body.

* fix(improver): update error message for OpenAI result

This commit updates the error message in the `improve_prompt`
function when the result from OpenAI does not contain a 'usage'
attribute. The previous message was unclear and did not
accurately describe the issue. The new message provides more
specific information about the error, which will help in
debugging and troubleshooting.

* add handling of insufficient funds
* feat: update api types

* fix: update published description for agent create form

* fix: update published description for agent editor

* fix: stop redirect to agent editor after creating agent

* feat: daisyui

* fix: zod conform to openapi types

* fix: typo in prompt editor

* fix: error grammar in prompt editor
* feat: change to azure llms and add uvicorn runner

This commit updates the import paths in `__init__.py` to be absolute
instead of relative. It also adds a uvicorn runner at the end of the
file to allow for direct execution. Additionally, the `comment_bot.py`
file has been updated to use `AzureChatOpenAI` instead of `ChatOpenAI`.

* refactor: Replace ChatOpenAI with AzureChatOpenAI

This commit replaces the usage of `ChatOpenAI` with `AzureChatOpenAI` in
`relevance_bot.py`. The change is made in the `create_chain`,
`summarize_submission`, and `filter_with_questions` functions. This
refactor is part of an effort to transition from OpenAI to Azure for
language model processing.

* fix: Correct Azure model names in relevance_bot.py

This commit corrects the Azure model names used in `relevance_bot.py`.
The model name in the `create_chain` function's docstring and the
`calculate_relevance` function call has been changed from
"gpt-4-turbo-preview" to "gpt-4-turbo". The model names in the
`summarize_submission` and `filter_with_questions` functions have been
changed from "gpt-4-turbo" to "gpt-35-turbo".

* fix: Remove testing things and remove import

* fix: Remove imports 2: electric boogaloo

* fix: Accidentally removed a dot in an import
The error toast that was previously shown when an agent was deleted
has been removed. This change simplifies the user experience by not
displaying an error message for a successful operation.
This commit changes the naming convention of the 'gpt-3.5-turbo' model
to 'gpt-35-turbo'. This change has been reflected in the schema,
creation form, agent page, agent items, and agent library.
This commit wraps the slot inside the Dialog.Content with a ScrollArea
component. This change provides a scrollable area within the dialog,
improving the user experience when the dialog content is larger than
the viewport.
Copy link

vercel bot commented May 16, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
aitino ⬜️ Ignored (Inspect) Visit Preview May 16, 2024 0:56am

Copy link

sonarcloud bot commented May 16, 2024

Quality Gate Passed Quality Gate passed

Issues
4 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
10.0% Duplication on New Code

See analysis details on SonarCloud

@antopiahk antopiahk merged commit c71da8f into alpha May 16, 2024
7 checks passed
@antopiahk antopiahk deleted the feature/finetuning-rest branch May 16, 2024 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants