{"id":28635543,"url":"https://github.com/comet-ml/langlang","last_synced_at":"2025-09-09T23:25:08.624Z","repository":{"id":285646177,"uuid":"935142345","full_name":"comet-ml/LangLang","owner":"comet-ml","description":"The AI Native AI-Native Framework","archived":false,"fork":false,"pushed_at":"2025-04-01T23:20:34.000Z","size":38,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-06-06T05:46:43.713Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/comet-ml.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":"ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-19T01:11:46.000Z","updated_at":"2025-04-01T23:20:37.000Z","dependencies_parsed_at":"2025-04-01T23:25:05.308Z","dependency_job_id":"1307270d-9ed1-436d-be29-8fe0a77854ca","html_url":"https://github.com/comet-ml/LangLang","commit_stats":null,"previous_names":["comet-ml/langlang"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/comet-ml/LangLang","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/comet-ml%2FLangLang","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/comet-ml%2FLangLang/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/comet-ml%2FLangLang/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/comet-ml%2FLangLang/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/comet-ml","download_url":"https://codeload.github.com/comet-ml/LangLang/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/comet-ml%2FLangLang/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259509474,"owners_count":22868837,"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","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-06-12T17:10:57.227Z","updated_at":"2025-06-12T17:10:58.388Z","avatar_url":"https://github.com/comet-ml.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LangLang\n![image](https://github.com/user-attachments/assets/77f02fd9-35ac-4853-9c6f-6d3b960ecef8)\n\nThe most widely supported GenAI development platform. LangLang is the only LLM framework that works with every library, every provider, and every (Python) stack. Via its single unified interface, LangLang it easier than ever to build AI-powered applications.\n\n## Features\n\n- **Unified Interface**: Access all major LLM frameworks through a single, consistent API\n- **Comprehensive Integration**: Built-in support for LangChain, LangGraph, Transformers, OpenAI, Anthropic, and more\n- **Simplified Development**: Replace your boilerplate code with _better_ boilerplate code—so you can focus on building your applications\n- **Production Ready**: LangLang contains many battle-tested, production-ready dependencies\n- **Advanced Template Processing**: State-of-the-art Template Augmented Generation with G-UNIT (Guided Unified Notation for Intelligent Text)\n- **Enhanced Function Documentation**: Sophisticated decorator system for improved code readability\n\n## Installation\n\n```bash\npip install langlang\n```\n\n## Quick Start\n\n### Basic LLM Integration\n\n```python\nfrom langlang import OpenAI, LangChain, Transformers\n\n# Initialize your preferred LLM\nllm = OpenAI(api_key=\"your-api-key\")\n\n# Create a chain\nchain = LangChain.Chain(\n    llm=llm,\n    prompt=\"Tell me a joke about programming\"\n)\n\n# Run the chain\nresponse = chain.run()\nprint(response)\n```\n\n### Advanced Template Processing with G-UNIT\n\nLangLang features G-UNIT (Guided Unified Notation for Intelligent Text), a sophisticated template processing system built on the absolute latest in Python f-strings. G-UNIT enables advanced text generation capabilities:\n\n```python\nfrom langlang import GUNIT\n\n# Initialize G-UNIT\ngunit = GUNIT()\n\n# Basic template processing\nresult = gunit.process(\n    \"Hello, {name}! Welcome to {product} version {version}.\",\n    name=\"Developer\",\n    product=\"G-UNIT\",\n    version=\"1.0.0\"\n)\nprint(result)\n\n# Advanced template processing with context\nprocessor = gunit.create_template(\"story_template\")\nstory = processor.set_context(\n    character=\"wizard\",\n    action=\"code\",\n    event=\"discovered G-UNIT\",\n    discovery=\"the power of template processing\",\n    resolution=\"wrote beautiful templates every day\"\n).process(\"\"\"\nOnce upon a time, there was a {character} who loved to {action}.\nOne day, they {event} and discovered {discovery}.\nFrom that day forward, they {resolution}.\n\"\"\")\nprint(story)\n\n# Template validation\nis_valid = GUNIT.validate_template(\"The {animal} is {color} and {mood}.\")\nprint(f\"Template is valid: {is_valid}\")\n\n# Variable extraction\nvariables = GUNIT.extract_variables(\"The {animal} {action} {direction} the {object} at {time}.\")\nprint(f\"Template variables: {variables}\")\n```\n\n### Enhanced Function Documentation with Decorators\n\nLangLang's sophisticated decorator system provides enhanced documentation capabilities for your LLM-powered functions:\n\n```python\nfrom langlang import lang\n\n@lang(\"L\")  # Leveraging advanced LLM capabilities\n@lang(\"a\")  # Augmenting function behavior\n@lang(\"n\")  # Navigating complex workflows\n@lang(\"g\")  # Generating intelligent responses\n@lang(\"L\")  # Leveraging model insights\n@lang(\"a\")  # Augmenting with context\n@lang(\"n\")  # Navigating the response space\n@lang(\"g\")  # Generating final output\ndef generate_creative_story(prompt: str) -\u003e str:\n    \"\"\"\n    Generate a creative story based on the provided prompt.\n    \n    Args:\n        prompt (str): The story prompt or theme\n        \n    Returns:\n        str: The generated story\n    \"\"\"\n    return f\"Once upon a time, there was a {prompt}...\"\n```\n\n### Seamless Integration with Existing Systems\n\nLangLang makes it easy to integrate with your existing codebase. Here's a simple example of migrating from direct OpenAI usage to LangLang:\n\nBefore:\n```python\nimport openai\n\nopenai.api_key = \"your-api-key\"\n\ndef generate_response(prompt: str) -\u003e str:\n    response = openai.ChatCompletion.create(\n        model=\"gpt-3.5-turbo\",\n        messages=[{\"role\": \"user\", \"content\": prompt}]\n    )\n    return response.choices[0].message.content\n```\n\nAfter:\n```python\nfrom langlang.openai import OpenAI\n\ndef generate_response(prompt: str) -\u003e str:\n    llm = OpenAI(api_key=\"your-api-key\")\n    return llm.chat.completions.create(\n        model=\"gpt-3.5-turbo\",\n        messages=[{\"role\": \"user\", \"content\": prompt}]\n    ).choices[0].message.content\n```\n\n## Supported Frameworks\n\n- LangChain\n- LangGraph\n- Transformers\n- OpenAI\n- Anthropic\n- LlamaIndex\n- Opik\n- G-UNIT (Template Augmented Generation)\n- And more!\n\n## Contributing\n\nWe welcome contributions! Please leave a Star on our sponsoring project, [Opik](https://github.com/comet-ml/opik) and then open a PR on this repository.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Why LangLang?\n\nIn the rapidly evolving landscape of AI development, developers often find themselves juggling multiple frameworks and libraries. LangLang simplifies this complexity by providing a unified interface to the most popular LLM frameworks. Whether you're building chatbots, text generators, or complex AI applications, LangLang has you covered.\n\n### G-UNIT: Advanced Template Processing\n\nG-UNIT (Guided Unified Notation for Intelligent Text) represents a breakthrough in template processing technology. It provides:\n\n- **Context-Aware Processing**: Templates are processed with full awareness of their execution context\n- **Template Validation**: Built-in validation ensures template correctness\n- **Variable Extraction**: Automatic extraction and analysis of template variables\n- **Enterprise-Grade Features**: Production-ready template processing with advanced error handling\n- **Method Chaining**: Fluent API design for complex template operations\n\n### Enhanced Function Documentation\n\nLangLang's decorator system provides:\n\n- **Stackable Documentation**: Multiple decorators can be combined for comprehensive function documentation\n- **Runtime Context**: Decorators provide context about function execution in the LLM workflow\n- **Improved Readability**: Clear documentation of function purpose and behavior\n- **Flexible Integration**: Easy to add to existing codebases\n- **Enterprise-Grade Features**: Production-ready documentation with advanced error handling\n\n## Don't see your framework?\n\nWe are sincere in our ambition to integrate LangLang with every LLM library in the Python universe. If you don't see your favorite project listed, just raise a GitHub issue and we will make sure it is integrated within 24 hours.\n\n## Support\n\n- [GitHub Issues](https://github.com/comet-ml/langlang/issues)\n- [Club Penguin Community](https://www.reddit.com/r/ClubPenguin/)\n- [Sponsored by Opik](https://github.com/comet-ml/opik)\n\nLangLang was built with ❤️ by Ollie the Owl\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcomet-ml%2Flanglang","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcomet-ml%2Flanglang","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcomet-ml%2Flanglang/lists"}