mem0ai / mem0

The Memory layer for your AI apps
https://mem0.ai
Apache License 2.0
21.85k stars 2k forks source link

ImportError: cannot import name 'ALLOWED_NETLOCK' from 'langchain.document_loaders.youtube' #1064

Closed FrankTseng168 closed 8 months ago

FrankTseng168 commented 8 months ago

🐛 Describe the bug

config_huggingface = { 'llm': { 'provider': 'huggingface', 'config': { 'model': 'google/flan-t5-xxl', 'temperature': 0.7, 'max_tokens': 1000, 'top_p': 0.8, 'stream': False } }, 'embedder': { 'provider': 'huggingface', 'config': { 'model': 'sentence-transformers/all-mpnet-base-v2' } } }

import os from embedchain import Pipeline as App os.environ["HUGGINGFACE_ACCESS_TOKEN"] = ""

Create a bot instance

elon_bot = App.from_config(config=config_huggingface)

Embed online resources

elon_bot.add("https://en.wikipedia.org/wiki/Elon_Musk") elon_bot.add("https://www.forbes.com/profile/elon-musk")

Query the bot

elon_bot.query("How many companies does Elon Musk run and name those?")

Chat the bot

elon_bot.chat("How many companies does Elon Musk run and name those?")

LouisMonierSpark commented 8 months ago

Same here. I face this error with the code for the quickstart paid model: ImportError: cannot import name 'ALLOWED_NETLOCK' from 'langchain.document_loaders.youtube'

deven298 commented 8 months ago

@FrankTseng168 @LouisMonierSpark this should be fixed in the next release! Please feel free to reach out if there is any other problem.