Skip to content

Commit

Permalink
refactor(dsp/modules/unify.py): remove system prompt specific append …
Browse files Browse the repository at this point in the history
…to history
  • Loading branch information
OscarArroyoVega committed Jul 19, 2024
1 parent 9245710 commit 24509b5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions dsp/modules/unify.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ def basic_request(
"""Basic request to the Unify's API."""
kwargs = {**self.kwargs, **kwargs}
messages = [{"role": "user", "content": prompt}]
if "system_prompt" in kwargs:
messages.insert(0, {"role": "system", "content": kwargs["system_prompt"]})

raw_response = self.client.generate(
messages=messages,
Expand All @@ -63,7 +61,7 @@ def basic_request(
)
response_content = (
raw_response if isinstance(raw_response, str) else "".join(raw_response)
) # to handle stream=True or False output format
) # to handle stream=True or False output format from Unify
formated_response: dict = {"choices": [{"message": {"content": response_content}}]}

history = {
Expand Down

0 comments on commit 24509b5

Please sign in to comment.