0 purchases
conva ai core
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.init(id: "<AssistantID>", key: "<APIKey>", version: "<Version>");
copied to clipboard
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 {
Response completion =
await ConvaAI.invokeCapability(input: "<input_query>");
print(completion)
} catch (error) {
print(error)
}
copied to clipboard
Streaming capability completion call
Stream<Response> completionStream =
ConvaAI.invokeCapabilityStream(
input: "<input_query>",
);
completionStream.listen(
(event) {
print(event)
},
onError: (error) {
print(error);
},
);
copied to clipboard
Use capability name
Capability names offer a direct way to invoke specific capabilities without the need to select them from capability groups.
For targeted and efficient execution, developers can directly invoke a capability using its unique name. This is ideal when the desired capability is known beforehand.
Non-streaming capability with name completion call
try {
Response completion =
await ConvaAI.invokeCapabilityWithName(input: "<input_query>", capability: "<your_capability_name>");
print(completion)
} catch (error) {
print(error)
}
copied to clipboard
Streaming capability with name completion call
Stream<Response> completionStream =
ConvaAI.invokeCapabilityStream(
input: "<input_query>",
capability: "<your_capability_name>"
);
completionStream.listen(
(event) {
print(event)
},
onError: (error) {
print(error);
},
);
copied to clipboard
Use capability groups
Capability Groups are used to control the list of Capabilities that the Assistant will have access.
Non-streaming capability with group completion call
try {
Response completion =
await ConvaAI.invokeCapability(input: "<input_query>", capabilityGroup: "<your_capability_group>");
print(completion)
} catch (error) {
print(error)
}
copied to clipboard
Streaming capability with group completion call
Stream<Response> completionStream =
ConvaAI.invokeCapabilityStream(
input: "<input_query>",
capabilityGroup: "<CAPABILITY_GROUP_NAME>"
);
completionStream.listen(
(event) {
print(event)
},
onError: (error) {
print(error);
},
);
copied to clipboard
For other integration related information, please visit : https://docs.conva.ai/conva.ai-docs
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.