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

npm 1.0.17 praisonai #401

Merged
merged 10 commits into from
Mar 3, 2025
Merged

npm 1.0.17 praisonai #401

merged 10 commits into from
Mar 3, 2025

Conversation

MervinPraison
Copy link
Owner

npm 1.0.17 praisonai

- Created package.json for documentation with Mintlify dev and build scripts
- Updated requirements.in with additional documentation and tool dependencies
- Removed redundant requirements.txt file
- Added support for enhanced documentation generation and API documentation
… cases

- Enhanced OpenAI service to support tool calls in chat and text generation methods
- Updated Agent classes to register and process tool functions dynamically
- Added new test cases for single and multi-tool agent interactions
- Improved type safety and conversion for OpenAI tool and message formats
- Bumped package version to 1.0.17
@MervinPraison MervinPraison merged commit a4a8132 into main Mar 3, 2025
3 of 5 checks passed
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @MervinPraison, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

Summary of Changes

This pull request updates the praisonai package to version 1.0.17 and introduces several enhancements, primarily focused on documentation, testing, and the addition of tool calling capabilities to the agent. It includes changes to .gitignore, documentation files, the core agent logic, and the OpenAI service integration.

Highlights

  • Version Update: The praisonai package version is bumped from 1.0.16 to 1.0.17 in src/praisonai-ts/package.json.
  • Documentation Improvements: Adds a netlify.toml file and updates package.json and requirements.in to improve documentation building and dependencies.
  • Testing Enhancements: Adds manual and automated testing instructions to src/praisonai-ts/README.md.
  • Tool Calling Support: Implements tool calling functionality in src/praisonai-ts/src/agent/proxy.ts and src/praisonai-ts/src/agent/simple.ts, allowing agents to use external functions.
  • OpenAI Service Integration: Updates src/praisonai-ts/src/llm/openai.ts to support tool calling with the OpenAI API, including message and tool conversion functions.
  • New Test Cases: Adds new test files src/praisonai-ts/tests/development/simple/multi-tool-call.ts and src/praisonai-ts/tests/development/simple/single-agent-tool-call.ts to test the tool calling functionality.

Changelog

Click here to see the changelog
  • .gitignore
    • Added .netlify to the ignore list.
  • docs/netlify.toml
    • Added a netlify.toml file to configure the Netlify build process.
  • docs/package.json
    • Added a package.json file with scripts for documentation development and building using Mintlify.
  • docs/requirements.in
    • Added several dependencies including mkdocs-glightbox, mkdocstrings, mkdocs-apidoc, mkdocstrings-python, rich, pyautogen, crewai, gradio, duckduckgo_search, praisonai_tools, and open-interpreter.
  • docs/requirements.txt
    • Removed all entries from this file.
  • src/praisonai-ts/README.md
    • Added sections for manual and automated testing instructions, including example commands.
  • src/praisonai-ts/package.json
    • Updated the package version from 1.0.16 to 1.0.17.
  • src/praisonai-ts/src/agent/proxy.ts
    • Added tools property to the ProxyAgentConfig interface.
    • Implemented logic to register tool functions from the config in the global scope.
  • src/praisonai-ts/src/agent/simple.ts
    • Added tools property to the SimpleAgentConfig interface.
    • Added toolFunctions property to the Agent class to store registered tool functions.
    • Implemented registerToolFunction method to register tool functions.
    • Implemented processToolCalls method to process tool calls from the model.
    • Modified the start method to handle tool calls and integrate them into the agent's response.
  • src/praisonai-ts/src/llm/openai.ts
    • Added types for ChatCompletionTool, ChatCompletionToolChoiceOption, and ChatCompletionMessageParam.
    • Added tool_calls property to the LLMResponse interface.
    • Added tool_call_id and tool_calls properties to the ChatMessage interface.
    • Implemented convertToOpenAIMessage function to convert custom ChatMessage to OpenAI's ChatCompletionMessageParam.
    • Implemented convertToOpenAITool function to convert custom tool format to OpenAI's ChatCompletionTool format.
    • Modified generateText, generateChat, streamText, and chatCompletion methods to support tool calling, including message and tool conversion, and handling tool call responses.
  • src/praisonai-ts/tests/development/simple/multi-tool-call.ts
    • Added a new test file to test multiple tool calls with the agent.
  • src/praisonai-ts/tests/development/simple/single-agent-tool-call.ts
    • Added a new test file to test a single agent tool call.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.


Did you know?

The term 'API' was first used in the context of operating systems in the 1960s, long before the internet became widespread.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

netlify bot commented Mar 3, 2025

Deploy Preview for praisonai canceled.

Name Link
🔨 Latest commit b966df4
🔍 Latest deploy log https://app.netlify.com/sites/praisonai/deploys/67c55fc25fd94a0008a7bf90

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

The pull request updates the praisonai-ts package to version 1.0.17, adds documentation and testing improvements, and introduces tool functionality to the agent. The changes look good overall, but there are a few areas that could be improved for clarity and maintainability.

Merge Readiness

The pull request is almost ready for merging. The changes related to tool functionality in the agent and the documentation updates are valuable additions. Before merging, it would be beneficial to address the comments to improve code clarity and maintainability. I am unable to directly approve this pull request, and recommend that others review and approve this code before merging.

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.

1 participant