conva_ai_core 0.0.4 conva_ai_core: ^0.0.4 copied to clipboard
This is the flutter plugin for using ConvaAI Co-pilots
CONVA.ai from Slang Labs is the world's first Copilot-as-a-Service platform, that allows developers to easily add AI aUgmented eXperiences (AUX) inside their app with the least effort.
Initialization :
ConvaAI.instance.initCopilot(id: "<AssistantID>", key: "<APIKey>", version: "<Version>");
Debugging responses : Conva AI uses generative AI to give you the response to your query. In order for you to understand the reasoning behind the response. We also provide you with AI's reasoning
Non-streaming capability completion call
try {
ConvaAICapabilityModel completion =
await ConvaAI.instance.invokeCapability(input: "Hello World");
print(completion)
} catch (error) {
print(error)
}
Streaming capability completion call
Stream<ConvaAICapabilityModel> completionStream =
ConvaAI.instance.invokeCapabilityStream(
input: "Hello World",
);
completionStream.listen(
(event) {
print(event)
},
onError: (error) {
print(error);
},
);
Use capability groups
Capability Groups are used to control the list of Capabilities that Co pilot will have access. You can make use of the capability group while using the invoke_capability method
Stream<ConvaAICapabilityModel> completionStream =
ConvaAI.instance.invokeCapabilityStream(
input: "Hello World",
capabilityGroup: "<CAPABILITY_GROUP_NAME>"
);
completionStream.listen(
(event) {
print(event)
},
onError: (error) {
print(error);
},
);
For other integration related information, please visit : https://docs.slanglabs.in/conva.ai-documentation-page/conva.ai-overview