{"id":31124182,"url":"https://github.com/genesisblock3301/langchain-_playground","last_synced_at":"2025-09-17T19:38:25.466Z","repository":{"id":310162003,"uuid":"1038916624","full_name":"GenesisBlock3301/langchain-_playground","owner":"GenesisBlock3301","description":"A hands-on space to experiment, learn, and build projects with LLMs using LangChain.","archived":false,"fork":false,"pushed_at":"2025-08-31T02:59:54.000Z","size":136,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-31T04:21:31.207Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GenesisBlock3301.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-16T04:38:55.000Z","updated_at":"2025-08-31T02:59:57.000Z","dependencies_parsed_at":"2025-08-16T07:36:51.260Z","dependency_job_id":null,"html_url":"https://github.com/GenesisBlock3301/langchain-_playground","commit_stats":null,"previous_names":["genesisblock3301/langchain-_playground"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/GenesisBlock3301/langchain-_playground","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GenesisBlock3301%2Flangchain-_playground","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GenesisBlock3301%2Flangchain-_playground/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GenesisBlock3301%2Flangchain-_playground/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GenesisBlock3301%2Flangchain-_playground/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GenesisBlock3301","download_url":"https://codeload.github.com/GenesisBlock3301/langchain-_playground/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GenesisBlock3301%2Flangchain-_playground/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275650063,"owners_count":25503216,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-17T02:00:09.119Z","response_time":84,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-09-17T19:38:22.063Z","updated_at":"2025-09-17T19:38:25.458Z","avatar_url":"https://github.com/GenesisBlock3301.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Message:\n\nMessages are the unit of communication in chat models. They are used to represent input and output of a chat model as well as additional context or metadata that maybe associated with a conversation.\n\nEach message has a role such as User, Assistant and content.\n\n# What is inside the message:\n- **Role:** The role of a message: e.g., User, Assistant.\n- **Content:** The content of the message. e.g., text and multi-modal data.\n- **additional metadata** like id, name, **token usage:**, model specific metadata.\n\n### Role: \n1. **System:** Used to tell the behaviour of a model with additional context.\n2. **User:** Representation of Input. User can input and command here.\n3. **Assistant:** Response from the model which can include text or a request to invoke tools.\n4. **Tool:** A message used to pass the results of a tool invocation back to the model after external data or \nprocessing has been retrieved.\n\n\n### Content:\nThe content of a message text or a list of dictionaries representing multimodal data.\n\n### LangChain Messages\n\nLangChain provides a unified message format that can be used across all chat models, allowing users to work with \ndifferent chat models without worrying about the specific details of the message format used by each model provider.\n\nLangChain messages are Python objects that subclass from a BaseMessage.\n\nThe five main message types are:\n\n- **SystemMessage:** corresponds to a system role \n- **HumanMessage:** corresponds to a user role \n- **AIMessage:** corresponds to assistant role \n- **AIMessageChunk:** corresponds to an assistant role, used for streaming responses \n- **ToolMessage:** corresponds to a tool role\n\n\n## Token\nToday's LLMs are typically based on transformer architecture that processes a sequence of units known as token.\nThe token is a fundamental element that models use to break down input and generate output\n\n### What is actually token?\nA token is the basic unit that a language model reads, processes and generates. These units can vary based on how \nthe model provided defines them, but in general they could represent:\n1. A whole word. e.g., apple \n2. A part of a word. e.g., app\n3. Or other linguistics components such as punctuations of spaces\nTokenization totally depends on **tokenizer algorithm** which convert input into tokens.\n\n### How tokens work in a language model:\n\n1. **Input Tokenized:** Model focuses on tokens rather than processing characters or entire sentences directly.\nFor example, If you are prompting -\u003e \"Langchain is cool,\" it could be tokenized into\n[\"Lang\", \"Chain\", \" is\", \" cool\", \"!\"]\n2. **Processing:** the transformer architecture behind these modes processes token sequentially to predict the next token in a sentence.\n3. **Output Generation:** The model generates one token one by one.\n\n\n## What is Embedding Model:\nEmbedding model transforms human language into a format that machines can understand and compare with speed and accuracy.\n\n## Vector Store:\n\nLangchain vector store object contains methods for adding text and Document objects to store and querying them using \nvarious similarity matrics.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgenesisblock3301%2Flangchain-_playground","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgenesisblock3301%2Flangchain-_playground","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgenesisblock3301%2Flangchain-_playground/lists"}