![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
function-agents
Advanced tools
A collection of Function Agents with specific purposes, utilizing the OpenAI API.
function-agents
is a collection of Function Agents with specific purposes, designed to simplify various tasks. To use these agents, you'll need to pass an OpenAI API Key upon construction.
For more examples and the full documentation, please visit https://platform.openai.com/docs/guides/gpt/function-calling.
To install the package, run the following command:
npm install function-agents
Import the agent you want to use into your project:
import { JavaScriptFunctionCallTransformationAgent } from 'function-agents';
const javascriptFunctionCallTransformationAgent = new JavaScriptFunctionCallTransformationAgent(
'your-openai-api-key',
'gpt-4-0613' // or any other supported model
);
const result = await javascriptFunctionCallTransformationAgent.run('function add(a, b) { return a + b; }');
Here's a list of available agents with brief descriptions and direct links to their code:
openai_api_key
: Your OpenAI API Key.model
: The name of the OpenAI model. Must be either gpt-3.5-turbo-0613
or gpt-4-0613
or gpt-4-32k-0613
Note: Some agents may have additional parameters such as the IntentClassificationAgent
which requires a list of intents to be passed in.
JavaScriptCodeInterpreterAgent invoked with: What is the square root of 20?
JavascriptDeveloperAgent invoked with: Write a JavaScript function to calculate the square root of 20.
function calculateSquareRoot() {
return Math.sqrt(20);
}
JavascriptDeveloperAgent successfully completed in 1827 ms
JavaScriptFunctionCallTransformationAgent invoked with function code and arguments: function calculateSquareRoot() {
return Math.sqrt(20);
}
JavaScriptInterpreterAgent successfully completed in 3111 ms
Generated OpenAI Function Call: {
"name": "calculateSquareRoot",
"description": "This function returns the square root of 20.",
"parameters": {
"type": "object",
"properties": {},
"required": []
}
}
Calling function with params:
Function result: 4.47213595499958
JavaScriptCodeInterpreterAgent successfully completed in 11787 ms
# console.log(response); from agent.run()
response {
message: "The square root of 20 is approximately 4.47.",
success: true,
duration: 11787
}
Install Bun
Run the following commands:
bun install
bun run build
We welcome contributions! Please feel free to submit a pull request.
This package is under the MIT License. See LICENSE
file for more details.
FAQs
A collection of Function Agents with specific purposes, utilizing the OpenAI API.
The npm package function-agents receives a total of 2 weekly downloads. As such, function-agents popularity was classified as not popular.
We found that function-agents demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.