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: Add the FerePro plugin #1502

Merged
merged 2 commits into from
Dec 28, 2024
Merged

Conversation

Rudrakc
Copy link
Contributor

@Rudrakc Rudrakc commented Dec 27, 2024

Relates to:

Adding FerePro integration – Adding structured ChatResponse handling. Fixes #1405


Risks

Low

  • Minor risk of WebSocket disconnection if API credentials are missing or invalid.
  • Potential parsing errors if unexpected data formats are returned from the WebSocket API.

Mitigation:

  • Graceful error handling and logging added.
  • Fallback responses provided for invalid data formats.

Background

What does this PR do?

  • Introduces structured handling of WebSocket responses using a new ChatResponse interface.
  • Updates the FereProService to parse WebSocket responses directly into ChatResponse.
  • Adds error handling for malformed data and WebSocket connection issues.

What kind of change is this?

Feature – Adds new functionality for structured WebSocket responses.
Improvement – Enhances existing WebSocket communication with additional validation and logging.


Documentation changes needed?

My changes do not require a change to the project documentation.


Testing

Where should a reviewer start?

  • Review the services/FereProService.ts file for WebSocket response handling logic.
  • Inspect the new ChatResponse interface and mapping in sendMessage().

Detailed testing steps

  1. Initialize the plugin by setting FERE_USER_ID in runtime settings.
  2. Send a WebSocket message through sendFereProMessage action.
  3. Verify structured response by logging ChatResponse details (answer, chat_id, credits used).
  4. Trigger error cases by using invalid WebSocket URLs and observe error handling behavior.

Deploy Notes

  • No database changes.
  • Ensure the WebSocket URL and user ID are correctly set in the environment configuration before deployment.

@Rudrakc Rudrakc changed the base branch from main to develop December 27, 2024 18:19
@shakkernerd shakkernerd changed the title Adding the FerePro plugin feat: Add the FerePro plugin Dec 28, 2024
@shakkernerd shakkernerd merged commit 582fb4b into elizaOS:develop Dec 28, 2024
4 checks passed
@Rudrakc Rudrakc deleted the add-fereProPlugin branch December 28, 2024 19:12
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.

FerePro Plugin for Eliza
2 participants