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

Added Float type to the function parameter values #77

Merged
merged 10 commits into from
Sep 25, 2024
Prev Previous commit
Next Next commit
fix bug in employee details copilot with function paths
  • Loading branch information
Sampreeth-sarma committed Sep 25, 2024
commit 2cb34949a1e03df8f36fe97052654e6bdd85fe54
8 changes: 4 additions & 4 deletions demos/employee_details_copilot/api_server/app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ class TopEmployeesProjects(BaseModel):
months_range: int = None # Optional (for filtering recent projects)


@app.post("/top_employees_projects")
@app.post("/employees_projects")
async def employees_projects(req: TopEmployeesProjects, res: Response):
params, filters = {}, []

Expand Down Expand Up @@ -224,8 +224,8 @@ class AvgProjPerformanceRequest(BaseModel):
department: str = None # Optional


@app.post("/avg_project_performance")
async def avg_project_performance(req: AvgProjPerformanceRequest, res: Response):
@app.post("/project_performance")
async def project_performance(req: AvgProjPerformanceRequest, res: Response):
params, filters = {}, []

if req.department:
Expand Down Expand Up @@ -256,7 +256,7 @@ class CertificationsExperienceRequest(BaseModel):
min_years_experience: int
department: str = None # Optional

@app.post("/employees_certifications_experience")
@app.post("/certifications_experience")
async def certifications_experience(req: CertificationsExperienceRequest, res: Response):
# Convert the list of certifications into a format for SQL query
certs_filter = ', '.join([f"'{cert}'" for cert in req.certifications])
Expand Down
4 changes: 2 additions & 2 deletions demos/employee_details_copilot/bolt_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ prompt_targets:

# 5. Employees with Highest Average Project Performance
- type: function_resolver
name: avg_project_performance
name: project_performance
description: |
Fetch employees with the highest average performance across all projects they have worked on over time. You can filter by minimum project count, department, and minimum performance score.
parameters:
Expand All @@ -167,7 +167,7 @@ prompt_targets:
type: string
endpoint:
cluster: api_server
path: /avg_project_performance
path: /project_performance
system_prompt: |
You are responsible for fetching employees with the highest average performance across all projects they’ve worked on. Apply filters for minimum project count, performance score, and department.

Expand Down
1 change: 1 addition & 0 deletions open-message-format
Submodule open-message-format added at 1e838f
Loading