Skip to content

Commit

Permalink
Merge branch 'staging' into custom-web-vineeth
Browse files Browse the repository at this point in the history
  • Loading branch information
VVoruganti committed Sep 11, 2023
2 parents 0ef8402 + 638c78a commit 28e20a4
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 16 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/vercel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,20 @@ name: Vercel Preview Deployment
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
on:
push:
branches-ignore:
- main
on: [push]
jobs:
Deploy-Preview:
Deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Vercel CLI
run: npm install --global vercel@latest
- name: Pull Vercel Environment Information
run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}
if: ${{ github.ref != 'refs/heads/main'}}
run: vercel pull --yes --environment=preview --git-branch=${{ github.ref_name }} --token=${{ secrets.VERCEL_TOKEN }}
- name: Pull Vercel Environment Information for Production
if: ${{ github.ref == 'refs/heads/main'}}
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
- name: Build Project Artifacts
run: vercel build --token=${{ secrets.VERCEL_TOKEN }}
- name: Deploy Project Artifacts to Vercel
Expand Down
1 change: 0 additions & 1 deletion agent/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ def get(self, user_id: str, location_id: str) -> None | Conversation:
self.memory_cache.popitem(last=False)
self.memory_cache[key] = Conversation(self.mediator, location_id=location_id, user_id=user_id, conversation_id=conversation_id, metadata=metadata)
return self.memory_cache[key]

return None

def put(self, user_id: str, location_id: str) -> Conversation:
Expand Down
3 changes: 0 additions & 3 deletions agent/mediator.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,6 @@ def delete_conversation(self, conversation_id: str) -> None:

def update_conversation(self, conversation_id: str, metadata: Dict) -> None:
cur = self.supabase.table(self.conversation_table).select("metadata").eq("id", conversation_id).single().execute()
print("========================================")
print(cur)
print("========================================")
if cur.data['metadata'] is not None:
new_metadata = cur.data['metadata'].copy()
new_metadata.update(metadata)
Expand Down
4 changes: 0 additions & 4 deletions api/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,6 @@ async def add_conversation(user_id: str, location_id: str = "web"):

@app.post("/api/conversations/update")
async def update_conversations(change: ConversationDefinition):
print("========================================")
print(change)
print("========================================")
async with LOCK:
MEDIATOR.update_conversation(conversation_id=change.conversation_id, metadata={"name": change.name})
return
Expand All @@ -93,7 +90,6 @@ async def get_messages(user_id: str, conversation_id: str):
"messages": converted_messages
}


@app.post("/api/chat")
async def chat(inp: ConversationInput):
async with LOCK:
Expand Down
2 changes: 0 additions & 2 deletions www/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,6 @@ export default function Home() {
const newName = prompt("Enter a new name for the conversation")
if (!newName)
return
console.log(newName)
console.log(cur)
fetch(`${URL}/api/conversations/update`, {
method: "POST",
body: JSON.stringify({
Expand Down

0 comments on commit 28e20a4

Please sign in to comment.