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

minor fix: rename kgenrichmentresponse #914

Merged
merged 1 commit into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions py/core/base/api/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
WrappedUserOverviewResponse,
)
from .restructure.responses import (
KGEnrichementResponse,
WrappedKGEnrichementResponse,
KGEnrichmentResponse,
WrappedKGEnrichmentResponse,
)
from .retrieval.responses import (
RAGAgentResponse,
Expand All @@ -57,8 +57,8 @@
"IngestionResponse",
"WrappedIngestionResponse",
# Restructure Responses
"KGEnrichementResponse",
"WrappedKGEnrichementResponse",
"KGEnrichmentResponse",
"WrappedKGEnrichmentResponse",
# Management Responses
"PromptResponse",
"ServerStats",
Expand Down
4 changes: 2 additions & 2 deletions py/core/base/api/models/restructure/responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
from pydantic import BaseModel


class KGEnrichementResponse(BaseModel):
class KGEnrichmentResponse(BaseModel):
enriched_content: Dict[str, Any]


WrappedKGEnrichementResponse = ResultsWrapper[KGEnrichementResponse]
WrappedKGEnrichmentResponse = ResultsWrapper[KGEnrichmentResponse]
13 changes: 1 addition & 12 deletions py/sdk/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,17 +88,6 @@ class KGSearchSettings(BaseModel):
}


class KGEnrichmentSettings(BaseModel):
leiden_params: dict = Field(
default_factory=dict,
description="Parameters for the Leiden algorithm.",
)
generation_config: GenerationConfig = Field(
default_factory=GenerationConfig,
description="Configuration for text generation during graph enrichment.",
)


class ProviderConfig(BaseModel, ABC):
"""A base provider configuration class"""

Expand Down Expand Up @@ -263,7 +252,7 @@ class KGEnrichmentSettings(BaseModel):
description="The parameters for the Leiden algorithm.",
)

class KGEnrichementResponse(BaseModel):
class KGEnrichmentResponse(BaseModel):
enriched_content: Dict[str, Any]

class UserResponse(BaseModel):
Expand Down
6 changes: 3 additions & 3 deletions py/sdk/restructure.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
from typing import Any, Dict, List, Optional, Union

from core.base import Document
from .models import KGEnrichmentSettings, KGEnrichementResponse
from .models import KGEnrichmentSettings, KGEnrichmentResponse

class RestructureMethods:
@staticmethod
async def enrich_graph(
client, KGEnrichmentSettings: KGEnrichmentSettings = KGEnrichmentSettings()
) -> KGEnrichementResponse:
) -> KGEnrichmentResponse:
"""
Perform graph enrichment over the entire graph.

Returns:
KGEnrichementResponse: Results of the graph enrichment process.
KGEnrichmentResponse: Results of the graph enrichment process.
"""
if not isinstance(KGEnrichmentSettings, dict):
KGEnrichmentSettings = KGEnrichmentSettings.model_dump()
Expand Down
Loading