-
Notifications
You must be signed in to change notification settings - Fork 1
Jw/tool bindings embeddings #5
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
Open
justinwilaby
wants to merge
13
commits into
main
Choose a base branch
from
jw/tool-bindings-embeddings
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ming and model types
2193612 to
8f9f9cf
Compare
3c87ea1 to
312d3cf
Compare
312d3cf to
807b873
Compare
807b873 to
f5d54e6
Compare
98f0944 to
9094bde
Compare
9094bde to
6899e40
Compare
6899e40 to
755c99d
Compare
032943c to
9d2aebd
Compare
9d2aebd to
c484b89
Compare
c484b89 to
1246ff9
Compare
7d46555 to
0d88f7f
Compare
0d88f7f to
d92fab6
Compare
6d6c818 to
d7335ff
Compare
d7335ff to
1509d7b
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Improvements for LangChain-Heroku Integration
Overview
This PR addresses critical correctness issues and implements significant improvements to the LangChain-Heroku integration. The changes focus on fixing foundational problems that could cause runtime failures, improving error handling, and enhancing overall system reliability.
What's changed?
1. Pydantic Model Implementation
2. Configuration Caching Bug
3. Model Type Correction
4. Enhanced Error Handling
�� Key Improvements
Type Safety & Validation
Error Handling & Debugging
Resource Management
Configuration Management
Flow
flowchart TD A[User Calls bind_tools] --> B[Input: tools + tool_choice] B --> C{Validate Input} C -->|Invalid| D[Raise ValueError] C -->|Valid| E[Convert Tools to API Format] E --> F{Process Each Tool} F -->|Dict Tool| G[Use as-is] F -->|BaseTool| H[Extract name, description, args_schema] F -->|Callable| I[Extract name, doc, signature] F -->|Class Type| J[Extract name, doc, Pydantic schema] G --> K[Add to API Tools List] H --> L[Create Function Definition] I --> M[Create Function Definition] J --> N[Create Function Definition] L --> O[Add Parameters Schema] M --> P[Add Parameters Schema] N --> Q[Add Parameters Schema] O --> R[Wrap in API Format] P --> S[Wrap in API Format] Q --> T[Wrap in API Format] R --> U[Add to API Tools List] S --> V[Add to API Tools List] T --> W[Add to API Tools List] U --> X{More Tools?} V --> X W --> X X -->|Yes| F X -->|No| Y[Create New ChatHeroku Instance] Y --> Z[Copy All Parameters] Z --> AA[Set tools = api_tools] AA --> BB[Set tool_choice = user_tool_choice] BB --> CC[Return New Instance] CC --> DD[User Can Use Bound Tools] style A fill:#f0f8ff style D fill:#ffe6e6 style CC fill:#f0fff0 style DD fill:#f0fff0Testing Strategy
Unit Tests
Integration Tests
Performance Tests
Impact
New Features