Skip to content

Commit

Permalink
feat: update hugging face agent prompt
Browse files Browse the repository at this point in the history
Signed-off-by: Tomas Dvorak <toomas2d@gmail.com>
  • Loading branch information
Tomas2D committed Feb 5, 2024
1 parent 016fd2b commit 421878f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/extensions/huggingface/huggingface_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ def heading(text: str) -> str:

client = Client(credentials=Credentials.from_env())

print(heading("Use hugging face agent with genai sdk"))
print(heading("Transformers Agent"))


agent = IBMGenAIAgent(
client=client,
model="meta-llama/llama-2-70b-chat",
parameters=TextGenerationParameters(min_new_tokens=10, max_new_tokens=200),
parameters=TextGenerationParameters(min_new_tokens=10, max_new_tokens=200, random_seed=777, temperature=0),
)

agent.chat("Download the chat from the given url", url="https://research.ibm.com/blog/analog-ai-chip-low-power")
agent.chat("Summarize the downloaded chat")
agent.chat("Extract text from the given url", url="https://research.ibm.com/blog/analog-ai-chip-low-power")
agent.chat("Do the text summarization on the downloaded text.")

0 comments on commit 421878f

Please sign in to comment.