Skip to content

Commit

Permalink
Pull in main
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkvolter committed Dec 12, 2024
1 parent 5980aee commit 08fc407
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
2 changes: 1 addition & 1 deletion cookbook/examples/agents/03_itinerary_planner.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"Ensure that the gathered data is accurate and tailored to the user's preferences, such as destination, group size, and budget constraints.",
"Create a clear and concise itinerary that includes: detailed day-by-day travel plan, suggested transportation and accommodation options, activity recommendations (e.g., sightseeing, dining, events), an estimated cost breakdown (covering transportation, accommodation, food, and activities).",
"If a particular website or travel option is unavailable, provide alternatives from other trusted sources.",
"Do not include direct links to external websites or booking platforms in the response."
"Do not include direct links to external websites or booking platforms in the response.",
],
)

Expand Down
9 changes: 3 additions & 6 deletions cookbook/vectordb/qdrant_db.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# pip install qdrant-client
# pip install qdrant-client
from phi.vectordb.qdrant import Qdrant
from phi.agent import Agent
from phi.knowledge.pdf import PDFUrlKnowledgeBase
Expand All @@ -13,10 +13,7 @@
"""
COLLECTION_NAME = "thai-recipes"

vector_db = Qdrant(
collection=COLLECTION_NAME,
url="http://localhost:6333"
)
vector_db = Qdrant(collection=COLLECTION_NAME, url="http://localhost:6333")

knowledge_base = PDFUrlKnowledgeBase(
urls=["https://phi-public.s3.amazonaws.com/recipes/ThaiRecipes.pdf"],
Expand All @@ -27,4 +24,4 @@

# Create and use the agent
agent = Agent(knowledge_base=knowledge_base, use_tools=True, show_tool_calls=True)
agent.print_response("List down the ingredients to make Massaman Gai", markdown=True)
agent.print_response("List down the ingredients to make Massaman Gai", markdown=True)
6 changes: 3 additions & 3 deletions phi/workspace/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from pathlib import Path
from typing import Optional, List, Dict

from pydantic import field_validator, ValidationInfo
from pydantic import field_validator, ValidationInfo, Field
from pydantic_settings import BaseSettings, SettingsConfigDict

from phi.api.schemas.workspace import WorkspaceSchema
Expand Down Expand Up @@ -117,9 +117,9 @@ class WorkspaceSettings(BaseSettings):
aws_az4: Optional[str] = None
aws_az5: Optional[str] = None
# Public subnets. 1 in each AZ.
public_subnets: List[str] = []
public_subnets: List[str] = Field(default_factory=list)
# Private subnets. 1 in each AZ.
private_subnets: List[str] = []
private_subnets: List[str] = Field(default_factory=list)
# Subnet IDs. 1 in each AZ.
# Derived from public and private subnets if not provided.
subnet_ids: Optional[List[str]] = None
Expand Down

0 comments on commit 08fc407

Please sign in to comment.