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

[backend] make deployment field optional in API and DB #213

Merged
merged 3 commits into from
Jun 14, 2024

Conversation

scott-cohere
Copy link
Contributor

@scott-cohere scott-cohere commented Jun 14, 2024

For v1 we don't need to be concerned about deployment type. To unblock FE I've made it optional here and defaulting the DB value to COHERE_PLATFORM and updated the unit tests accordingly. Also generating new client for FE.

AI Description

This PR introduces changes to the Agent model and associated tests. The deployment field is now optional and can be set to null. Additionally, a new tools field has been added, which is an array of ToolName enums. This enum includes options such as 'Wikipedia', 'search_file', and 'Python_Interpreter'.

The following changes have been made:

  • The deployment field in the Agent model is now optional and can be null.
  • A new tools field has been added to the Agent model, which is an array of ToolName enums.
  • Updated the CreateAgent and UpdateAgent types to include the new tools field and make the deployment field optional.
  • Removed the Auth type and added new types for JWTResponse, ListAuthStrategy, and Logout.
  • Updated the DefaultService class to use the new types and handle the optional agentId parameter in the listToolsV1ToolsGet method.
  • Removed the test_create_agent_missing_deployment test cases as they are no longer applicable with the optional deployment field.

@codecov-commenter
Copy link

codecov-commenter commented Jun 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (main@24c4164). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #213   +/-   ##
=======================================
  Coverage        ?   88.14%           
=======================================
  Files           ?      137           
  Lines           ?     4545           
  Branches        ?        0           
=======================================
  Hits            ?     4006           
  Misses          ?      539           
  Partials        ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@scott-cohere scott-cohere merged commit 3cd9a44 into main Jun 14, 2024
2 checks passed
@scott-cohere scott-cohere deleted the scott/optional-agent-fields branch June 14, 2024 17:44
ClaytonSmith added a commit to MiniMap-ai/cohere-toolkit that referenced this pull request Jun 17, 2024
* [backend] make deployment field optional in API and DB (cohere-ai#213)

---------

Co-authored-by: Tianjing Li <tianjinglimail@gmail.com>
Co-authored-by: Tomeu <tomeu@cohere.com>
Co-authored-by: Scott <146760070+scott-cohere@users.noreply.github.com>
Co-authored-by: Beatrix De Wilde <128378696+BeatrixCohere@users.noreply.github.com>
ClaytonSmith added a commit to MiniMap-ai/cohere-toolkit that referenced this pull request Jun 17, 2024
* [coral-web] rename schema fields and update openapi client (cohere-ai#189)

* update

* update client

* Add use agents view env variable.  (cohere-ai#192)

* Change

* Format

* [backend] api_key not set for class methods (cohere-ai#191)

* fix

* easier fix

* perf: downgrade rehype-highlight and generate once blob url (cohere-ai#193)

* perf: downgrade rehype-highlight and generate once blob url

* fix: replace code blocks to iframe in conversation history

* refactor: run format

* refactor: pr feedback

* Add OIDC auth strategy, add Blacklist scaffolding (model/schema/crud) (cohere-ai#190)

* add oidc, blacklist logic

* Add auth

* Add logic for GET /auth

* Mods

* fix: html preview with citations (cohere-ai#200)

* [backend] adding tools for agents, filter tools by agent_id (cohere-ai#204)

* changes

* lint

* filter tools by agent

* lint

* update tests

* lint and squash migrations

* fix alembic migration err

* lint

* merge (#3)


* [backend] make deployment field optional in API and DB (cohere-ai#213)

---------

Co-authored-by: Tianjing Li <tianjinglimail@gmail.com>
Co-authored-by: Tomeu <tomeu@cohere.com>
Co-authored-by: Scott <146760070+scott-cohere@users.noreply.github.com>
Co-authored-by: Beatrix De Wilde <128378696+BeatrixCohere@users.noreply.github.com>

* pulling from main

* cleaned backend docker image push

* syncing with main (conflicts)

---------

Co-authored-by: Scott <146760070+scott-cohere@users.noreply.github.com>
Co-authored-by: Beatrix De Wilde <128378696+BeatrixCohere@users.noreply.github.com>
Co-authored-by: Tomeu <tomeu@cohere.com>
Co-authored-by: Tianjing Li <tianjinglimail@gmail.com>
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.

3 participants