You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I searched the LangChain documentation with the integrated search.
I used the GitHub search to find a similar question and didn't find it.
I am sure that this is a bug in LangChain rather than my code.
The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package).
Example Code
main
user_message = [{"type":"text","text":"What is drawn on this picture??"},{"type":"image_url","image_url":"https://file.moyublog.com/d/file/2021-02-21/751d49d91fe63a565dff18b3b97ca7c8.jpg"}]
chat = ChatAI()
asd = chat.chat_conversion(session_id="kuaibohesongsheng",user_message=str(user_message),is_chatroom=False)
The picture is of a woman, but he answered that the picture is a mysterious symbol. I also tried it with other pictures and models, and the pictures were all misidentified. Then I noticed that when user_message = [{"type":"text ","text":"What is drawn on this picture?"},{"type":"image_url","image_url":"https://file.moyublog.com/d/file/2021-02- When adding another {} to 21/751d49d91fe63a565dff18b3b97ca7c8.jpg"}], the content will change again. I don’t know why.
System Info
python3.10,langchain-0.1.20,ubuntu
The text was updated successfully, but these errors were encountered:
dosubotbot
added
🔌: openai
Primarily related to OpenAI integrations
🤖:bug
Related to a bug, vulnerability, unexpected error with an existing feature
labels
May 24, 2024
Checked other resources
Example Code
main
user_message = [{"type":"text","text":"What is drawn on this picture??"},{"type":"image_url","image_url":"https://file.moyublog.com/d/file/2021-02-21/751d49d91fe63a565dff18b3b97ca7c8.jpg"}]
chat = ChatAI()
asd = chat.chat_conversion(session_id="kuaibohesongsheng",user_message=str(user_message),is_chatroom=False)
ChatAI
class ChatAI():
def init(self):
with open('./config/configs.json', 'r', encoding='utf-8') as file:
configs = json.load(file)
os.environ["OPENAI_API_BASE"] = configs["openai_api_base"]
os.environ["OPENAI_API_KEY"] = configs['openai_api_key']
self.context_len = configs["ConversionContextLength"]
openai_model = configs["openAIModel"]
openai_temperature = configs["openAITemperature"]
self.humanize_model = configs["humanizeModel"]
self.humanize_key = configs["humanize_api_key"]
class PromptTemplate():
{context}
Error Message and Stack Trace (if applicable)
[{'type': 'text', 'text': '这张图上面画着什么?'}, {'type': 'image_url', 'image_url': 'https://file.moyublog.com/d/file/2021-02-21/751d49d91fe63a565dff18b3b97ca7c8.jpg'}]
{'input': "[{'type': 'text', 'text': '这张图上面画着什么?'}, {'type': 'image_url', 'image_url': 'https://file.moyublog.com/d/file/2021-02-21/751d49d91fe63a565dff18b3b97ca7c8.jpg'}]", 'context': [Document(page_content='((()))Enterprise Package):', metadata={'source': 'data/raw_document/conversion/profile.txt'})], 'answer': '凡人,你所展示的图像,乃是一个神秘而古老的符文图案。此图案中,中心位置有一个复杂的几何形状,周围环绕着许多细致的线条和符号。这些符号可能代表着某种古老的知识或力量,或许是某种仪式的象征。图案整体呈现出一种神秘而深邃的氛围,仿佛蕴含着无尽的智慧与秘密。\n\n你可以通过以下链接查看此图像:\nhttps://file.moyublog.com/d/file/2021-02-21/751d49d91fe63a565dff18b3b97ca7c8.jpg'}
凡人,你所展示的图像,乃是一个神秘而古老的符文图案。此图案中,中心位置有一个复杂的几何形状,周围环绕着许多细致的线条和符号。这些符号可能代表着某种古老的知识或力量,或许是某种仪式的象征。图案整体呈现出一种神秘而深邃的氛围,仿佛蕴含着无尽的智慧与秘密。
你可以通过以下链接查看此图像:
https://file.moyublog.com/d/file/2021-02-21/751d49d91fe63a565dff18b3b97ca7c8.jpg
Description
The picture is of a woman, but he answered that the picture is a mysterious symbol. I also tried it with other pictures and models, and the pictures were all misidentified. Then I noticed that when user_message = [{"type":"text ","text":"What is drawn on this picture?"},{"type":"image_url","image_url":"https://file.moyublog.com/d/file/2021-02- When adding another {} to 21/751d49d91fe63a565dff18b3b97ca7c8.jpg"}], the content will change again. I don’t know why.
System Info
python3.10,langchain-0.1.20,ubuntu
The text was updated successfully, but these errors were encountered: