Observed since 21 Oct, 10:06 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
ai-care
AI-Care endows AI with the capability to speak proactively. With simple settings, AI-Care allows your AI to proactively care for you.
Current AI models are only capable of passively responding to user inquiries and lack the ability to initiate conversations. AI-Care endows AI with the capability to speak proactively. With simple settings, AI-Care allows your AI to proactively care for you.
def to_llm_method(chat_context, to_llm_messages: list[AICareContext]) -> str | Generator[str, None, None]:
# Here you need to convert `to_llm_messages` into the message format of the LLM you are using
# and send the message to the LLM.
# The return value is the message content replied by the LLM.
# If you are not using stream mode, directly return the reply message string.
# You can also use stream mode, in which case a string generator should be returned.
# If using stream mode, AICare will also automatically use stream mode when sending messages to the user.
pass
def to_user_method(to_user_message: str | Generator[str, None, None]) -> None:
# Here you need to process messages from AICare as you would a normal LLM reply.
# If using stream mode, this method should be able to receive and handle a string generator.
# If the `to_llm` method uses stream mode, then this method should also use stream mode.
pass
from ai_care import AICare
ai_care = AICare()
ai_care.register_to_llm_method(to_llm_method)
ai_care.register_to_user_method(to_user_method)
# After each round of conversation or when AICare service is needed
ai_care.chat_update(chat_context)
# Set guidance information
ai_care.set_guide(guide="your guide")
# Set how long before AI-Care is activated
ai_care.set_config(key="delay", value=60)
# Set the number of times AI-Care selects “ASK_LATER”, setting it to 0 can disable this option.
ai_care.set_config(key="ask_later_count_limit", value=1)
# Set the system default recursive depth for ask.
ai_care.set_config(key="ask_depth", value=1)
# Set the maximum number of chat intervals the system automatically records.
ai_care.set_config(key="n_chat_intervals", value=20)
This project is licensed under the MIT License.
Download counts and popularity will appear here as the collector receives them.
Declarations describe requirements; they are not a resolved dependency graph.
bdist_wheel · 15.16 KB · Python py3
sdist · 18.86 KB · Python source
Observed since 21 Oct, 10:06 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:4cc7e3bca28db04599c097193ab07ba6242ab66623ece10d9f4e9359a1140df1