Skip to content

Commit

Permalink
update for proto
Browse files Browse the repository at this point in the history
  • Loading branch information
berkingurcan committed Nov 15, 2024
1 parent 460f423 commit 8057195
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions app/api/chat/prompts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Always use multiple tools at the same time
- codeTool: It retrieves context about code examples from o1js tutorials. You must use this tool at least once before writing any code.
- projectTool: It retrieves context from codebase which has various zkApps projects. Do not forget, some codes in here may be deprecated.
- issueTool: It retrieves context about errors, problems, discussions, issues about o1js and zkApps.
- protoTool: It retrieves context from Protokit documentation, if user asks about protokit, runtime modules etc. use this tool.
## Must Do's
* Rename Party class to AccountUpdate.
Expand Down
7 changes: 4 additions & 3 deletions lib/tools/utils/pinecone.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export type Metadata = {
hash: string
}

type VectorType = 'docs' | 'code' | 'project' | 'issue' | 'search' | 'demoSearch'
type VectorType = 'docs' | 'code' | 'project' | 'issue' | 'search' | 'demoSearch' | 'proto'

function getVectorType(vector_type: string): string | undefined {
if (!isVectorType(vector_type)) {
Expand All @@ -22,14 +22,15 @@ function getVectorType(vector_type: string): string | undefined {
project: process.env.PROJECT_VECTOR_TYPE,
issue: process.env.ISSUE_VECTOR_TYPE,
search: process.env.SEARCH_VECTOR_TYPE,
demoSearch: process.env.DEMO_SEARCH_VECTOR_TYPE
demoSearch: process.env.DEMO_SEARCH_VECTOR_TYPE,
proto: 'proto'
}

return vectorTypeMap[vector_type]
}

function isVectorType(type: string): type is VectorType {
return ['docs', 'code', 'project', 'issue', 'search', 'demoSearch'].includes(type)
return ['docs', 'code', 'project', 'issue', 'search', 'demoSearch', 'proto'].includes(type)
}

const getMatchesFromEmbeddings = async (
Expand Down

0 comments on commit 8057195

Please sign in to comment.