Skip to content
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

免费账号报错403 #218

Closed
xym003 opened this issue Apr 21, 2024 · 1 comment
Closed

免费账号报错403 #218

xym003 opened this issue Apr 21, 2024 · 1 comment

Comments

@xym003
Copy link

xym003 commented Apr 21, 2024

代码如下:
`import os
from langchain.chains import LLMChain
from langchain_core.prompts import PromptTemplate
from langchain_openai import OpenAI

template = """Question: {question}
Answer: Let's think step by step."""

prompt = PromptTemplate.from_template(template)

api_key = "---"#正确输入了
api_base = "https://api.chatanywhere.tech/v1"
llm = OpenAI(api_key=api_key, base_url=api_base,model_name="gpt-3.5-turbo")

llm_chain = LLMChain(prompt=prompt, llm=llm)
question = "What NFL team won the Super Bowl in the year Justin Beiber was born?"

llm_chain.invoke(question)`
我看到项目简介里是支持langchain的,为什么会一直报403错误呢?是不支持langchain的分包吗?
恳请解答

@ynpl
Copy link

ynpl commented Apr 22, 2024

这个用了不是免费的模型了 它里面还用了其他的模型 应该是

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants