2 comments

  1. 1min AI2y ago

    Hi Pyro The model name is deepseek. We will update the document soon. Thank you!

    1. Pyro2y ago

      deepseek doesn't work.

      got following error when use deepseek as model name.

      Request failed with status code 404: {"message":"Invalid model deepseek for AI feature CONTENT_GENERATOR_BLOG_ARTICLE!"}

      following are sample code:

      import requests

      import json

      # Define the additional string to concatenate

      additional_string = " Hello."

      # Combine the content from the file with the additional string

      user_content = additional_string

      # Set up the API request

      api_key = "" # Replace with your actual API key

      endpoint = "https://api.1min.ai/api/features"

      headers = {

      "API-KEY": api_key,

      "Content-Type": "application/json"

      }

      payload = {

      "type": "CONTENT_GENERATOR_BLOG_ARTICLE",

      "model": "deepseek",

      "promptObject": {

      "prompt": "Hi",

      "isMixed": False

      }

      }

      # Make the API request

      response = requests.post(endpoint, headers=headers, json=payload)

      # Check for a successful response

      if response.status_code == 200:

      response_data = response.json()

      #print(response_data)

      # Write the full JSON response to a text file

      output_file_path = "response.json" # Replace with your desired output file path

      with open(output_file_path, "w") as output_file:

      json.dump(response_data, output_file, indent=4)

      result_object = response_data["aiRecord"]["aiRecordDetail"]["resultObject"]

      for content in result_object:

      print(content)

      else:

      print(f"Request failed with status code {response.status_code}: {response.text}")