Skip to content

Commit

Permalink
rename kgenrichmentresponse (#914)
Browse files Browse the repository at this point in the history
  • Loading branch information
shreyaspimpalgaonkar authored Aug 21, 2024
1 parent 4ea5b59 commit 3c7d1cf
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 21 deletions.
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

0 comments on commit 3c7d1cf

Please sign in to comment.