nyx_extras.langchain ==================== .. py:module:: nyx_extras.langchain .. autoapi-nested-parse:: Optional module for tight integration between Nyx and LangChain. Classes ------- .. autoapisummary:: nyx_extras.langchain.NyxLangChain Module Contents --------------- .. py:class:: NyxLangChain(config = None, llm = None, log_level = logging.WARN, system_prompt = None) Bases: :py:obj:`nyx_client.client.NyxClient` An opinionated client wrapping langChain to evaluate user queries against contents of a Nyx network. This class extends NyxClient to provide LangChain-based functionality for querying Nyx network contents. .. note:: The LLM must support tool calling. .. py:method:: query(query, data = None, include_own = False, sqlite_file = None) Query the LLM with a user prompt and context from Nyx. This method takes a user prompt and invokes it against the LLM associated with this instance, using context from Nyx. :param query: The user input. :param data: Sequence of data to use for context. If not specified, uses all subscribed data. :param include_own: Include your own data, created in Nyx, in the query. :param sqlite_file: A file location to write the sql_lite file to. :param update_subscribed): if set to true this will re-poll Nyx for subscribed data :returns: The answer from the LLM. .. note:: If the data list is not provided, this method updates subscriptions and retrieves all subscribed data.