题意:
when i am using langchain chat openai model and invoking method it's working but when using in crewai same llm models it gives invalid api key
当你提到在使用 langchain
的 chatopenai
模型并调用方法时一切正常,但在 crewai
中使用相同的 LLM(大型语言模型)模型时却收到“无效的 API 密钥”错误
问题背景:
import os
from langchain_openai import OpenAI
from langchain_openai import ChatOpenAI
from langchain.prompts import PromptTemplate
chat_model = ChatOpenAI( openai_api_base = "https://integrate.api.nvidia.com/v1",
model_name="meta/llama3-70b-instruct",
openai_api_key = "api key",