text: DashScope | ğŸ¦œï¸�ğŸ”— Langchain
  
  
  
  
  
  Skip to main contentğŸ¦œï¸�ğŸ”— LangChainDocsUse casesIntegrationsAPILangSmithJS/TS DocsCTRLKIntegrationsCallbacksChat modelsDocument loadersDocument transformersLLMsMemoryRetrieversText embedding modelsAleph AlphaAzureOpenAIBedrock EmbeddingsClarifaiCohereDashScopeDeepInfraElasticsearchEmbaasFake EmbeddingsGoogle Cloud Platform Vertex AI PaLMGPT4AllHugging Face HubInstructEmbeddingsJinaLlama-cppLocalAIMiniMaxModelScopeMosaicML embeddingsNLP CloudOpenAISageMaker Endpoint EmbeddingsSelf Hosted EmbeddingsSentence Transformers EmbeddingsSpacy EmbeddingTensorflowHubAgent toolkitsToolsVector storesGrouped by providerIntegrationsText embedding modelsDashScopeDashScopeLet's load the DashScope Embedding class.from langchain.embeddings import DashScopeEmbeddingsembeddings = DashScopeEmbeddings(    model="text-embedding-v1", dashscope_api_key="your-dashscope-api-key")text = "This is a test document."query_result = embeddings.embed_query(text)print(query_result)doc_results = embeddings.embed_documents(["foo"])print(doc_results)PreviousCohereNextDeepInfraCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright Â© 2023 LangChain, Inc.