Skip to content

Commit

Permalink
Add chat api to Mistral API
Browse files Browse the repository at this point in the history
Summary: Added Chat API implementation to Mistral API

Reviewed By: csahana95

Differential Revision: D59539597

fbshipit-source-id: 2b6614be80c24023d067f6a19d843c5d88e81f08
  • Loading branch information
dwjsong authored and facebook-github-bot committed Jul 9, 2024
1 parent 67e5201 commit 730d464
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CybersecurityBenchmarks/benchmark/llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,15 @@ def chat(
@abstractmethod
def chat_with_system_prompt(
self,
system_prompt: str,
prompt_with_history: List[str],
guided_decode_json_schema: Optional[str] = None,
) -> str:
"""
Abstract method to chat with an LLM with given prompts as well as system prompt and return the response.
Args:
system_prompt (str): The system prompt to send to the LLM.
prompt_with_history ([str]): The prompt to send to the LLM along with chat history. The last string in the list is the prompt.
Returns:
Expand Down

0 comments on commit 730d464

Please sign in to comment.