-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #32 from polywrap/chore/agent-integration-touchups
chore: agent integration touchups
- Loading branch information
Showing
20 changed files
with
212 additions
and
188 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"folders": [ | ||
{ | ||
"name": "workers", | ||
"path": "workers" | ||
}, | ||
{ | ||
"name": "web", | ||
"path": "web" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,29 @@ | ||
from supabase import Client | ||
from typing import Any, Dict | ||
from supabase import Client, PostgrestAPIResponse | ||
import uuid | ||
|
||
|
||
def insert( | ||
db: Client, | ||
title: str, | ||
recipient: str, | ||
description: str, | ||
website: str | ||
db: Client, title: str, recipient: str, description: str, website: str | ||
) -> str: | ||
id = str(uuid.uuid4()) | ||
db.table("projects").insert({ | ||
"id": id, | ||
"title": title, | ||
"recipient": recipient, | ||
"description": description, | ||
"website": website | ||
}).execute() | ||
db.table("projects").insert( | ||
{ | ||
"id": id, | ||
"title": title, | ||
"recipient": recipient, | ||
"description": description, | ||
"website": website, | ||
} | ||
).execute() | ||
return id | ||
|
||
|
||
def get_projects(db: Client) -> PostgrestAPIResponse[Dict[str, Any]]: | ||
return ( | ||
db.table("projects") | ||
.select( | ||
"id, title, description, website, applications(id, recipient, round, answers)" | ||
) | ||
.execute() | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,23 @@ | ||
from supabase import Client | ||
import uuid | ||
from ..client import create_admin | ||
|
||
|
||
def insert(db: Client, worker_id: str, prompt: str) -> str: | ||
id = str(uuid.uuid4()) | ||
db.table("runs").insert({ | ||
"id": id, | ||
"worker_id": worker_id, | ||
"prompt": prompt | ||
}).execute() | ||
db.table("runs").insert( | ||
{"id": id, "worker_id": worker_id, "prompt": prompt} | ||
).execute() | ||
return id | ||
|
||
|
||
def get_prompt(db: Client, run_id: str) -> str: | ||
return ( | ||
db.table("runs") | ||
.select("prompt") | ||
.eq("id", run_id) | ||
.limit(1) | ||
.single() | ||
.execute() | ||
.data | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
from typing import List | ||
from pydantic import BaseModel, ConfigDict, Field | ||
|
||
class GitcoinIndexingJob(BaseModel): | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.