Create Newspaper Headline from Text

Generates a newspaper headline.

Input

This task creates a newspaper headline from a text. You can specify a context that allows you to tailor the type of journalism you need, resulting in an eye-catching and relevant headline.

[1.0.0]:
First release
VersionAI ModelCreatedLink
1.0.0gpt_3.528.03.2023

API

The REST API allows you to call the tool with the same costs as when running the tool. Please generate an Personal access token before using the REST API.

Parameters

  • text (Text): The text that generates the newspaper headline
  • lang (Language): The language the article should be written in
  • context (Context): The context of the text writing
  • Call the REST API by cURL
    curl -v -H "Authorization: Bearer PERSONAL_ACCESS_TOKEN" https://api.anysolve.ai/rest/v1/create-newspaper-headline/1.0.0?text=A%20group%20of%20police%20officers%20who%20carried%20out%20a%20failed%20armed%20raid%20at%20rapper%20Afroman's%20residence%20last%20year%20have%20sued%20him%20for%20invasion%20of%20privacy%20and%20emotional%20distress.%20The%20officers%20claim%20that%20Afroman%20used%20footage%20of%20the%20incident%20in%20his%20music%20videos%20without%20their%20consent%2C%20along%20with%20others%20associated%20with%20his%20record%20label.%20The%20lawsuit%20was%20recently%20filed%20in%20Adams%20County%2C%20Ohio%2C%20and%20names%20officers%20Shawn%20D%20Cooley%2C%20Justin%20Cooley%2C%20Michael%20D%20Estep%2C%20Shawn%20D%20Grooms%2C%20Brian%20Newland%2C%20Lisa%20Phillips%2C%20and%20Randolph%20L%20Walters%20Jr%20as%20plaintiffs.%20They%20allege%20that%20their%20likenesses%20were%20exploited%20for%20commercial%20gain.&lang=English&context=You%20are%20a%20boulevard%20journalist.
  • Install the package with pip
    python3 -m pip install anysolve
  • Run in python3
    import os
    from anysolve import AnySolve
    anysolve_token = os.environ.get('ANYSOLVE_PERSONAL_ACCESS_TOKEN') # Resolve your personal access token here
    client = AnySolve(anysolve_token)
    res = client.run('create-newspaper-headline','1.0.0', {'text': 'A group of police officers who carried out a failed armed raid at rapper Afroman\'s residence last year have sued him for invasion of privacy and emotional distress. The officers claim that Afroman used footage of the incident in his music videos without their consent, along with others associated with his record label. The lawsuit was recently filed in Adams County, Ohio, and names officers Shawn D Cooley, Justin Cooley, Michael D Estep, Shawn D Grooms, Brian Newland, Lisa Phillips, and Randolph L Walters Jr as plaintiffs. They allege that their likenesses were exploited for commercial gain.', 'lang': 'English', 'context': 'You are a boulevard journalist.'})
    print(res)
  • Coming soon: Within AnySolve ChatComplete prompts you can use the following command to execute the task:
    /run('create-newspaper-headline','1.0.0', text='A group of police officers who carried out a failed armed raid at rapper Afroman\'s residence last year have sued him for invasion of privacy and emotional distress. The officers claim that Afroman used footage of the incident in his music videos without their consent, along with others associated with his record label. The lawsuit was recently filed in Adams County, Ohio, and names officers Shawn D Cooley, Justin Cooley, Michael D Estep, Shawn D Grooms, Brian Newland, Lisa Phillips, and Randolph L Walters Jr as plaintiffs. They allege that their likenesses were exploited for commercial gain.', lang='English', context='You are a boulevard journalist.')