feat: cohere inference api endpoint #15
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
adds a new API endpoint to support Cohere API v2 inference (https://docs.cohere.com/v2/docs/chat-api)
closes ENG-551
AI-Generated Summary
PR Summary
Overview of Changes
Ahoy! This PR be chartin' a course towards integratin' the Cohere
/v2/chatAPI into the burpference sea of code. By the stars, it updates the.gitignoreto only shun configs with a_localsuffix, sparing any file without it. On the deck, a newCohereAPIAdapterclass is now standin' ready, a sturdy vessel for handlin' requests and responses to and from Cohere's API. Further into the hold, theREADME.mdin theconfigsdirectory now boasts instructions for settin' sail with the Cohere API, includin' an example configuration scribbled neatly in JSON. Lastly, a brand new configuration file be added to the mix, specifically tailored for interfacin' with Cohere's API.Key Modifications
.gitignoreUpdate: Changed to ignore onlyconfigs/*_local.jsonfiles, allowin' other config files to breathe the sea air without bein' unnoticed by the crew (Git).CohereAPIAdapterwithinburpference/api_adapters.py, completin' the crew with methods for preparin', sendin', and processin' requests to Cohere's/v2/chatservice.README.mdwithin theconfigsdirectory to include a detailed map (documentation) for settin' course towards Cohere API integration, includin' a JSON example for the sake o' clarity.cohere_command_r_plus_08_2024.jsonunder theconfigsdirectory, markin' the coordinates for how the application should engage with the Cohere API.Potential Impact
burpferenceto include more diverse interactions with AI APIs, potentially increasin' the utility and flexibility of the tool..gitignore, there's a chance for minor confusion or mishaps with config file tracking for landlubbers not familiar with the naming convention. Care should be taken to document and inform all crew members of this change.This summary was generated with ❤️ by rigging