{"id":28702266,"url":"https://github.com/modelscope/langchain-modelscope","last_synced_at":"2025-06-14T12:32:16.846Z","repository":{"id":269930883,"uuid":"908808806","full_name":"modelscope/langchain-modelscope","owner":"modelscope","description":"Langchain integration for ModelScope","archived":false,"fork":false,"pushed_at":"2024-12-27T08:32:50.000Z","size":66,"stargazers_count":5,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-04T13:45:54.714Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/modelscope.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}},"created_at":"2024-12-27T02:57:10.000Z","updated_at":"2025-04-04T04:25:50.000Z","dependencies_parsed_at":"2024-12-27T09:26:12.663Z","dependency_job_id":null,"html_url":"https://github.com/modelscope/langchain-modelscope","commit_stats":null,"previous_names":["modelscope/langchain-modelscope"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/modelscope/langchain-modelscope","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modelscope%2Flangchain-modelscope","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modelscope%2Flangchain-modelscope/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modelscope%2Flangchain-modelscope/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modelscope%2Flangchain-modelscope/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/modelscope","download_url":"https://codeload.github.com/modelscope/langchain-modelscope/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modelscope%2Flangchain-modelscope/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259816176,"owners_count":22915827,"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-14T12:30:52.151Z","updated_at":"2025-06-14T12:32:16.840Z","avatar_url":"https://github.com/modelscope.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# langchain-modelscope-integration\n\nThis package contains the LangChain integration with ModelScope\n\n## Installation\n\n```bash\npip install -U langchain-modelscope-integration\n```\n\nHead to [ModelScope](https://modelscope.cn/) to sign up to ModelScope and generate an [SDK token](https://modelscope.cn/my/myaccesstoken). Once you've done this set the `MODELSCOPE_SDK_TOKEN` environment variable:\n\n```bash\nexport MODELSCOPE_SDK_TOKEN=\u003cyour_sdk_token\u003e\n```\n\n## Chat Models\n\n`ModelScopeChatEndpoint` class exposes chat models from ModelScope. See available models [here](https://www.modelscope.cn/docs/model-service/API-Inference/intro).\n\n```python\nfrom langchain_modelscope import ModelScopeChatEndpoint\n\nllm = ModelScopeChatEndpoint(model=\"Qwen/Qwen2.5-Coder-32B-Instruct\")\nllm.invoke(\"Sing a ballad of LangChain.\")\n```\n\n## Embeddings\n\n`ModelScopeEmbeddings` class exposes embeddings from ModelScope.\n\n```python\nfrom langchain_modelscope import ModelScopeEmbeddings\n\nembeddings = ModelScopeEmbeddings(model_id=\"damo/nlp_corom_sentence-embedding_english-base\")\nembeddings.embed_query(\"What is the meaning of life?\")\n```\n\n## LLMs\n`ModelScopeLLM` class exposes LLMs from ModelScope.\n\n```python\nfrom langchain_modelscope import ModelScopeLLM\n\nllm = ModelScopeLLM(model=\"Qwen/Qwen2.5-Coder-32B-Instruct\")\nllm.invoke(\"The meaning of life is\")\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmodelscope%2Flangchain-modelscope","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmodelscope%2Flangchain-modelscope","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmodelscope%2Flangchain-modelscope/lists"}