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

feat(server):generate args types for assistant functions and validate args schema #8445

Merged
merged 6 commits into from May 12, 2024

Conversation

yuval-hazaz
Copy link
Member

@yuval-hazaz yuval-hazaz commented May 9, 2024

Close: #8443

PR Details

  • Add the functions JSON definition files into the server folder
  • Generate types for the functions args
  • Use the generated types for all function args (input)
  • Validate the input received from OpenAI against the JSON schema
  • Add a prebuild script on amplication-server to generate the types before build

PR Checklist

  • Tests for the changes have been added
  • npm test doesn't throw any error

IMPORTANT: Please review the CONTRIBUTING.md file for detailed contributing guidelines.

@yuval-hazaz yuval-hazaz marked this pull request as draft May 9, 2024 05:13
Copy link

nx-cloud bot commented May 9, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 3360553. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 2 targets

Sent with 💌 from NxCloud.

@yuval-hazaz yuval-hazaz marked this pull request as ready for review May 9, 2024 13:13
@mulygottlieb
Copy link
Member

@overbit I approved this, but I think it would be nice if you looked just FYI (this will be the beginning of doing an "infrastructure as code" approach for the OpenAI assistant definitions, and it connects to https://github.com/amplication/private-issues/issues/184

@mulygottlieb mulygottlieb merged commit 8d0ded5 into next May 12, 2024
12 checks passed
@mulygottlieb mulygottlieb deleted the feat/jovu-schema-validation branch May 12, 2024 17:37
@mulygottlieb mulygottlieb linked an issue May 13, 2024 that may be closed by this pull request
@overbit overbit mentioned this pull request May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment