feat(assistant): added openai to assist in generating js/ts code and json schemas

Merged
WA
2y ago
+1625-154
  • change hiddenFromSidebar to hideFromToolbar
  • added code generation for the function block's code
  • added ai code gen to custom tools and response format
  • optimize system prompts for js/json generation following our formatting
  • added history, fixed apply to replace instead of append
  • remove unused imports
  • updated styling of chat bar
  • refined system prompts for code generation, resolved PR comments

Description

  • added openai to assist in generating js/ts code (custom tools, function block) and json schemas (response format, custom tool schema)
  • features: chat history, apply, system prompts specific to whether we are doing code generation for js/ts or for a schema, provided examples of our formatting

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Ran many queries and ensured that there were no issues in generating schemas or in generating code.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added tests that prove my fix is effective or that my feature works
  • All tests pass locally and in CI (npm test)
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules
  • I have updated version numbers as needed (if needed)

Security Considerations:

  • My changes do not introduce any new security vulnerabilities
  • I have considered the security implications of my changes

Additional Information:

https://github.com/user-attachments/assets/01d94038-5763-405e-905d-3d7f5197e987

https://github.com/user-attachments/assets/288ac3b7-b9ce-4fd6-8fc9-d16f39db07e8