-
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 #233 from lifeomic/FLDM-474/agents-client
Add Agents client for invoking basic agent
- Loading branch information
Showing
3 changed files
with
131 additions
and
54 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
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,17 @@ | ||
from typing import Dict, List, Union | ||
from phc.base_client import BaseClient | ||
|
||
|
||
class Agents(BaseClient): | ||
""" | ||
Provides access to the PHC agents API, which allows you to call LLM-based agents. | ||
""" | ||
|
||
def invoke_basic(self, body: Union[str, List[Dict]]): | ||
""" | ||
Invokes a basic agent, which supports either a basic prompt string or a list of | ||
messages which can include images as data urls. | ||
""" | ||
return self._api_call( | ||
"/v1/agents/basic/invoke", json={"input": body}, http_verb="POST" | ||
) |
Oops, something went wrong.