njfio / fluent_cli

Fluent CLI is an advanced command-line interface designed to interact seamlessly with multiple workflow systems like FlowiseAI, Langflow, Make, and Zapier. Tailored for developers and IT professionals, Fluent CLI facilitates robust automation, simplifies complex interactions, and enhances productivity through a powerful and command suite
https://fluentcli.com
Apache License 2.0
13 stars 2 forks source link

V.0.3.6.1 anthropic native integration #33

Closed njfio closed 3 months ago

njfio commented 3 months ago

This commit introduces significant enhancements to the Fluent CLI by adding support for Anthropic and OpenAI Assistant integrations. The changes include updates to the configuration file, new client modules, and modifications to the main processing logic. Below are the key changes:

  1. Configuration Updates:

    • Added new configuration entries for Anthropic and OpenAI Assistant in config.json.
    • Updated existing configurations for better handling of API keys and settings.
  2. New Client Modules:

    • Anthropic Client: Implemented anthropic_agent_client.rs to handle requests and responses from Anthropic's API.
    • OpenAI Assistant Client: Extended openai_agent_client.rs with new functions to manage threads, runs, and tool outputs for OpenAI's Assistant.
  3. Main Logic Enhancements:

    • Modified main.rs to include the new engine types (anthropic and open_ai_assistant).
    • Added handling logic for the new engine types in the main processing match case.
  4. Client Handling Enhancements:

    • Implemented detailed handling functions for parsing and processing responses from both Anthropic and OpenAI Assistant.
    • Enhanced error handling and logging to provide better insights during runtime.
  5. Utility Functions:

    • Added utility functions for creating threads, adding messages, creating runs, and checking run status for OpenAI Assistant.
    • Included functions for extracting and submitting tool outputs.
  6. Timeout and Error Management:

    • Implemented timeout management for long-running processes.
    • Improved error messages and debug logs for easier troubleshooting.

These changes aim to enhance the capabilities of the Fluent CLI by integrating advanced conversational AI models, providing users with more options and better performance.

Files Modified:

Files Added:

These updates make the Fluent CLI more robust and extend its functionality to support newer AI models and services.