-
Notifications
You must be signed in to change notification settings - Fork 907
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
feat(agents-api): Implement doc* models #442
Merged
Merged
Conversation
This file contains 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
Signed-off-by: Diwank Tomer <[email protected]>
Signed-off-by: Diwank Tomer <[email protected]>
Signed-off-by: Diwank Tomer <[email protected]>
Signed-off-by: Diwank Tomer <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Looks good to me! Reviewed everything up to 22211fe in 1 minute and 43 seconds
More details
- Looked at
3100
lines of code in54
files - Skipped
3
files when reviewing. - Skipped posting
6
drafted comments based on config settings.
1. sdks/python/julep/api/types/docs_create_doc_request.py:5
- Draft comment:
TheDocsCreateDocRequestContent
type is imported but not used directly in this file. It's used indirectly in thecontent
field definition. This might be confusing as it's not clear from this file alone whatDocsCreateDocRequestContent
entails without looking at its definition. Consider adding a comment here explaining thatDocsCreateDocRequestContent
can be either a string or a list of strings. - Reason this comment was not posted:
Confidence changes required:33%
The import ofDocsCreateDocRequestContent
is used in the definition of thecontent
field of theDocsCreateDocRequest
model. However, the actual type isn't visible in this file, which might confuse someone who isn't looking at theDocsCreateDocRequestContent
definition directly. A comment could help clarify this indirect usage.
2. sdks/python/julep/api/types/docs_doc_reference.py:25
- Draft comment:
Thesnippets
field inDocsDocReference
is defined as a list ofDocsSnippet
, which is required to have at least one item due to the@minItems(1)
annotation. This is a good practice as it ensures that when aDocsDocReference
is used, it always has at least one snippet, which is likely a requirement for the functionality relying on this model. - Reason this comment was not posted:
Confidence changes required:0%
The modelDocsDocReference
includes asnippets
field that must have at least one item. This is a good design decision because it enforces that there are always snippets to work with when handling a document reference, which is likely important for the operations that use this model.
3. sdks/python/julep/api/types/docs_hybrid_doc_search_request.py:17
- Draft comment:
Thevector
field inDocsHybridDocSearchRequest
is correctly defined as a list of floats, which is appropriate for representing a vector in search queries. This aligns well with the typical usage of vectors in search algorithms where a vector represents a point in a multidimensional space. - Reason this comment was not posted:
Confidence changes required:0%
Thevector
field in theDocsHybridDocSearchRequest
model is defined as a list of floats, which is standard for representing vectors in programming and data science, particularly in contexts involving search and machine learning algorithms.
4. sdks/python/julep/api/types/docs_snippet.py:6
- Draft comment:
TheDocsSnippet
model is well-defined withindex
andcontent
fields. This model is likely used to represent segments of a document, whereindex
could denote the order or position of the snippet in the document, andcontent
is the actual text of the snippet. This is a typical pattern for handling segmented text data. - Reason this comment was not posted:
Confidence changes required:0%
TheDocsSnippet
model includesindex
andcontent
fields, which are essential for representing parts of a document in a structured way. This model is straightforward and aligns with common practices in handling text data that is broken into segments or snippets.
5. sdks/python/julep/api/types/docs_text_only_doc_search_request.py:12
- Draft comment:
Thetext
field inDocsTextOnlyDocSearchRequest
is appropriately defined as a single string, which is suitable for scenarios where a text-based search is performed without the need for vector data. This simplifies the usage of the model in purely text-based search contexts. - Reason this comment was not posted:
Confidence changes required:0%
TheDocsTextOnlyDocSearchRequest
model is specifically for text-only searches, and thetext
field is correctly a single string. This is ideal for search functionalities that operate solely on textual data, ensuring the model is not overloaded with unnecessary fields.
6. sdks/python/julep/api/types/docs_vector_doc_search_request.py:12
- Draft comment:
Thevector
field inDocsVectorDocSearchRequest
is correctly defined as a list of floats. This is essential for vector-based search functionalities where each float in the list represents a dimension in the vector space used for search operations. - Reason this comment was not posted:
Confidence changes required:0%
TheDocsVectorDocSearchRequest
model is designed for vector-based searches, and thevector
field is appropriately a list of floats. This is standard practice for representing vectors in search algorithms, where each float corresponds to a dimension in a multidimensional space.
Workflow ID: wflow_ZdigQcudENyC8Sq9
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
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.
Summary:
Implemented new document models and endpoints for the agents API, including create, delete, embed, and search functionalities, along with necessary migrations and SDK updates.
Key points:
CreateDocRequest
,Snippet
, and updatedDocReference
inagents-api/agents_api/autogen/Docs.py
.create_doc
,delete_doc
,embed_snippets
,get_doc
,list_docs
, andsearch_docs_by_embedding
inagents-api/agents_api/models/docs
.migrate_1722710530_unify_owner_doc_relations.py
to unify owner-doc tables.agents-api/agents_api/models/__init__.py
and related files.Generated with ❤️ by ellipsis.dev