Skip to content

Commit

Permalink
Merge pull request #214 from tigergraph/GML-1602-fix-the-register-end…
Browse files Browse the repository at this point in the history
…point-inconsistence

GML-1602 fix the endpoint to match copilot
  • Loading branch information
parkererickson-tg authored Apr 5, 2024
2 parents 061e105 + 8bcbfe8 commit 9fca80b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyTigerGraph/ai/ai.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def registerCustomQuery(self, function_header: str, description: str, docstring:
"docstring": docstring,
"param_types": param_types
}
url = self.nlqs_host+"/"+self.conn.graphname+"/registercustomquery"
url = self.nlqs_host+"/"+self.conn.graphname+"/register_docs"
return self.conn._req("POST", url, authMode="pwd", data = data, jsonData=True, resKey=None)

def retrieveDocs(self, query:str, top_k:int = 3):
Expand All @@ -58,7 +58,7 @@ def retrieveDocs(self, query:str, top_k:int = 3):
"query": query
}

url = self.nlqs_host+"/"+self.conn.graphname+"/retrievedocs?top_k="+str(top_k)
url = self.nlqs_host+"/"+self.conn.graphname+"/retrieve_docs?top_k="+str(top_k)
return self.conn._req("POST", url, authMode="pwd", data = data, jsonData=True, resKey=None, skipCheck=True)

def query(self, query):
Expand Down

0 comments on commit 9fca80b

Please sign in to comment.