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

openai[patch]: pass message name #17537

Merged
merged 8 commits into from
Mar 19, 2024
Merged

Conversation

efriis
Copy link
Member

@efriis efriis commented Feb 14, 2024

No description provided.

Copy link

vercel bot commented Feb 14, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
langchain ⬜️ Ignored (Inspect) Visit Preview Mar 19, 2024 7:55pm

@efriis efriis added the partner label Feb 14, 2024
@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Feb 14, 2024
@efriis efriis self-assigned this Feb 14, 2024
@dosubot dosubot bot added Ɑ: models Related to LLMs or chat model modules 🤖:improvement Medium size change to existing code to handle new use-cases 🔌: openai Primarily related to OpenAI integrations labels Feb 14, 2024
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels Feb 21, 2024
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Feb 22, 2024
@efriis efriis changed the title openai[patch]: pass ai message name openai[patch]: pass message name Feb 22, 2024
@@ -12,7 +12,7 @@ license = "MIT"

[tool.poetry.dependencies]
python = ">=3.8.1,<4.0"
langchain-core = "^0.1.16"
langchain-core = "^0.1.25"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

had to bump core for basemessage.name

message_dict["tool_call_id"] = message.tool_call_id

# tool message doesn't have name: https://platform.openai.com/docs/api-reference/chat/create#chat-create-messages
del message_dict["name"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we log a warning here? Will OpenAI reject this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OpenAI rejects. Think I should raise an error?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed to pass through unless it's none

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Mar 19, 2024
@efriis efriis enabled auto-merge (squash) March 19, 2024 19:55
@efriis efriis merged commit 69e9610 into master Mar 19, 2024
20 checks passed
@efriis efriis deleted the erick/openai-patch-pass-ai-message-name branch March 19, 2024 19:57
gkorland pushed a commit to FalkorDB/langchain that referenced this pull request Mar 30, 2024
chrispy-snps pushed a commit to chrispy-snps/langchain that referenced this pull request Mar 30, 2024
hinthornw pushed a commit that referenced this pull request Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖:improvement Medium size change to existing code to handle new use-cases Ɑ: models Related to LLMs or chat model modules 🔌: openai Primarily related to OpenAI integrations partner size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants