Skip to content

Schemas

LiteralQueryType = Literal['text', 'code'] module-attribute

ChunkID dataclass

chunk_type instance-attribute

pk_id instance-attribute

__init__(pk_id, chunk_type)

CodeChunkProtocol

Bases: Protocol

Any treesitter parsed code chunk should have at least these attributes.

This is for the attributes of a parsed code chunk that are useful for searching/filtering in qdrant. Does not need to include all the possible information about a code chunk. To get the additional information about a code chunk, a separate call can be made to retrieve additional information.

id instance-attribute

name instance-attribute

CodeChunkType

Bases: StrEnum

CLASS = 'class' class-attribute instance-attribute

DOCSTRING = 'docstring' class-attribute instance-attribute

FUNCTION = 'function' class-attribute instance-attribute

IMPORT = 'import' class-attribute instance-attribute

OTHER = 'other' class-attribute instance-attribute

CodeFileQdrantMetadata

Bases: AbstractQdrantMetadata

code_chunk_type instance-attribute

full_chunk_info = Field(default=None, description='Additional information about the chunk optionally loaded from the database.') class-attribute instance-attribute

github_metadata instance-attribute

language instance-attribute

name instance-attribute

parent_classes = Field(default_factory=list) class-attribute instance-attribute

pk_id = Field(description='The primary key id of the related chunk in the database.') class-attribute instance-attribute

user_clerk_id instance-attribute

as_artifact()

as_content()

from_chunk_and_gh_metadata(chunk, gh_metadata, user_clerk_id, chunk_type, language, parent_classes=None) classmethod

Create the metadata object that will be stored in qdrant.

Note: The full_chunk_info is not stored in qdrant, but can be loaded from the database when needed.

GithubFilterArgs

Bases: BaseModel

chunk_type = Field(default=None, description='The code chunk type to filter by.') class-attribute instance-attribute

file_path_end = Field(default=None, description="The end of the file path to filter by. (e.g. '.py', 'some_file.py', 'sub_dir/file.py')") class-attribute instance-attribute

file_path_start = Field(default=None, description="The start of the file path to filter by. (e.g. 'src/', 'src/main/')") class-attribute instance-attribute

language = Field(default=None, description='The language to filter by.') class-attribute instance-attribute

repo_id = Field(description='The repository to search in.') class-attribute instance-attribute

user_id = Field(description='The user to search as.') class-attribute instance-attribute

GithubScrollResult dataclass

last_point_id instance-attribute

results instance-attribute

__init__(results, last_point_id)

as_artifact()

as_content()

GithubSearchResult

Bases: BaseModel

content instance-attribute

metadata instance-attribute

qdrant_id instance-attribute

score instance-attribute

as_artifact()

as_content()

GithubSearchResults dataclass

results instance-attribute

__init__(results)

__post_init__()

as_artifact()

as_content()

TextFileQdrantMetadata

Bases: AbstractQdrantMetadata

chunk_index instance-attribute

github_metadata instance-attribute

language instance-attribute

pk_id instance-attribute

user_clerk_id instance-attribute

as_artifact()

as_content()

VectorizedRepositoryInfo

Bases: BaseModel

num_classes = 0 class-attribute instance-attribute

num_code_chunks = 0 class-attribute instance-attribute

num_functions = 0 class-attribute instance-attribute

num_imports = 0 class-attribute instance-attribute

num_text_chunks = 0 class-attribute instance-attribute

total_points = 0 class-attribute instance-attribute