rgbkrk / chatlab

โšก๏ธ๐Ÿงช Fast LLM Tool Calling Experimentation, big and smol
https://chatlab.dev
Other
138 stars 12 forks source link

Documentation Plans #53

Open rgbkrk opened 1 year ago

rgbkrk commented 1 year ago

The initial website for stable releases is up at chatlab.dev ๐ŸŽ‰ and the site for unstable releases is pre.chatlab.dev. For the current alpha release, docs will be maintained in this repository in ./website while the previous stable release is at https://github.com/rgbkrk/chatlab-docs.

Here's some initial thinking on the doc site layout:

rgbkrk commented 1 year ago
from chatlab.builtins import os_functions
from chatlab import Chat, system, models

chat = Chat(
    system("You are a software engineer helper. You have access to the file system and can make any file operations that you want to, including git. Format responses to the user in GitHub Flavored Markdown. We are working on the official documentation for a package called Chatlab."),
    model=models.GPT_4_0613,
    chat_functions=os_functions,
)

await chat("Please run `help(chatlab)` as well as `dir(chatlab)` to learn more about the package. After that, look to see what docusaurus docs are already written for `website`, particularly `website/docs/api`. Use what you find to create a prioritized list of what you think needs to be done.")

Based on the findings, here's the list of classes, methods and attributes present in the chatlab package as well as corresponding documentation found:

  1. Chat: No documentation found

    1. A class for managing and manipulating chats
  2. ChatlabMetadata: No documentation found

    1. A class for chat metadata
  3. Conversation: No documentation found

    1. A class for handling conversation related operations
  4. FunctionRegistry

    1. Documentation found FunctionRegistry
    2. This class handle registration of functions that can be interacted with by chat models
  5. Session: No documentation found

    1. A class representing a chat session
  6. Markdown: No documentation found

    1. A markdown related class
  7. ai: No documentation found

    1. Most likely a method or attribute related to the chat's AI
  8. assistant: No documentation found

    1. Most likely a method or attribute related to the chat's assistant
  9. narrate: No documentation found

    1. Probably a method or attribute regarding narration in the chat
  10. system: No documentation found

    1. Most likely some system related attribute or method
  11. user: No documentation found

    1. A function which creates a message from the user, with content as the content of the message

The following prioritization of the work needed could be considered:

  1. Chat class and related methods

  2. Session class and related methods

  3. Assistant functions or methods

  4. User and System related attributes or methods

  5. Narrate related attributes or methods

  6. Other attributes/methods: Markdown, ai etc.

  7. Miscellaneous clean up and linking within docs The accessible documents in a narrative form include:

  8. 'Intro.md' - This is guide provides an overview on how to get started with Chatlab, how to set API keys, understanding the conversation roles, registering functions, submitting messages, and calling functions.

  9. 'Setting-api-keys.md' - This guide provides detailed instructions on setting up API keys in various environments like Jupyter, Noteable, Colab, Kaggle, and other cloud notebooks.

  10. 'Interpreter.mdx' - This documentation provides details on the builtin code interpreter in ChatLab. It also explains data personas and how the model can work with DataFrames.

await chat("Session is deprecated. It's only exported to maintain backwards compatibility. Please document the `Chat` class instead. To see more of what's been written in a narrative form, see the other docs in `website/docs`.")

Based on the documents above and the 'FunctionRegistry' document that we examined earlier, it seems like the undocumneted parts of the Chatlab package are its major classes like Chat, ChatlabMetadata, and Conversation, and some functions like ai, assistant, narrate, system, user.

To generate a useful and comprehensive documentation, the priority should be:

  1. Document the Chat class: As the core of the package and the focus of user interaction, this is a critical part to understand how to use the package. Details should include how to instantiate and manipulate a Chat object, special methods within the class, and other relevant details.

  2. Document other important classes: ChatlabMetadata and Conversation. Detailed coverage of the functionalities provided by these classes will aid users in handling data and configuring the chat systems.

  3. Document functions: Understanding helper functions like ai, assistant, narrate, system, user is crucial. Detailed coverage including code samples, use cases, and function details should be given.

  4. Improve the existing documents: The existing documents typically lack some details. A good practice to follow while updating these documents would be to include information like links to relevant resources, caveats to watch out for, best practices, and how to resolve common errors.

  5. Linking between Documents: Create cross-references between the documents so that users can easily navigate through the knowledge base.

  6. Walkthroughs illustrating common workflows: This will provide practical, hands-on guidance to users.

  7. Miscellaneous clean up and checks: This includes tasks that enhance overall readability and ease of use like fixing broken links, updating document metadata, improving content organization, and, ensuring a consistent style across all documents.