-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: unsupported operand type(s) for |: '_GenericAlias' and 'type' #87
Comments
"|" is not available on python3.9. We'll fix it soon to adapt lower python interpreters, you can degrade to v0.2.7 when we are fixing the problem. |
thank you, you are the best 🤗 |
I Love u guys 🚀 I have some app based on our api 😅 Could it help you if I develop a custom LLM connector for your API's langchain? Some time ago with your bee I managed to run AUTOGPT without paying the API. With this custom langchain LLM wrapper anyone can develop for free app like talk with pdf, python interpreter, etc... Let me know if you're interested :) |
Of course I would develop it for free for you, I respect you very much. If you want, I am also willing to send you the code without taking credit |
wow that's cool, feel free to develop it! |
Hy guys 🚀, I developed LLM langchain custom wrapper. Now you can use this api with langchain in a similar way to how OpenAI models are used. Try this example: from HCA import HCA
from langchain import PromptTemplate
# Initialize the HCA instance with your HuggingFace credentials
llm = HCA(email="YOUR_EMAIL", password="YOUR_PASSWORD", log=True, model=1)
# Define a template for your prompt
template = """Answer the question based on the context below. If the
question cannot be answered using the information provided, answer
with "I don't know".
Context: Large Language Models (LLMs) are the latest models used in NLP.
Their superior performance over smaller models has made them incredibly
useful for developers building NLP-enabled applications. These models
can be accessed via Hugging Face's `transformers` library, via OpenAI
using the `openai` library, and via Cohere using the `cohere` library.
Question: {query}
Answer: """
# Create a PromptTemplate for generating prompts
prompt_template = PromptTemplate(
input_variables=["query"],
template=template
)
# Generate a response to a specific question
response = llm(
prompt_template.format(
query="Which libraries and model providers offer LLMs?"
)
)
print(response) |
Now evryone can create and develop custom langchain agent based on HuggingChat model :) @Soulter thanks for this opportunity |
This is another simple example that shows the potential of the custom langchain connector. from HCA import HCA
from langchain.agents import initialize_agent, AgentType
from langchain.tools.yahoo_finance_news import YahooFinanceNewsTool
llm = HCA(email="yourEmail", password="YourPSW" , model=0, temperature=0.1)
tools = [YahooFinanceNewsTool()]
agent_chain = initialize_agent(
tools,
llm,
agent=AgentType.ZERO_SHOT_REACT_DESCRIPTION,
verbose=True,
)
agent_chain.run(
"What happens today with Microsoft stocks?",
) |
Hi guys,
i have this error with new version
The text was updated successfully, but these errors were encountered: