ChatComplete (GPT and others)

This task completes a prompt by ChatComplete with a generative transformer large language model

Input

Description

This task completes a prompt by ChatComplete with a generative transformer large language model. You can enter a message and the assistant responds with a message.

Models

Currently we support the following models:

  • GPT 3.5 Turbo - gpt-3.5-turbo: This model is provided by OpenAI. It is very effective when it comes to price-performance. It allows 8k prompt size.
  • GPT 3.5 Turbo with extended prompt lenght - gpt-3.5-turbo-16k: This model is provided by OpenAI. It is very effective when it comes to price-performance. It allows 16k prompt size.
  • GPT 4 - gpt-4: This model is provided by OpenAI. It allows 8k prompt size.
  • GPT 4 Turbo - gpt-4-turbo: This model is provided by OpenAI. It is the most capable model we currently offer. It allows 128k prompt size.
  • AnySolve v1 - gpt-as-fc-v1: This model is provided by AnySolve. It's capability can be compared to GPT 3.5 Turbo. It is hosted within the EU. [REMOVED as on 12.4.2024 due to the AI Act.]
[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

  • prompt (Prompt): The prompt input
  • context (Context): Allows to add context to the chat
  • engine (Execution Engine): Defines the execution engine
  • allow_plugins (Allow AnyChat plugins): Whether to allow plugins that allow ChatComplete to execute other tasks.
  • plugin_tasks (Plugin tasks): List tasks that are shown to GPT for execution.
  • show_chat (Show Chat [NOT IMPLEMENTED]): Whether to show the chat.
  • chat_id (ChatID [NOT IMPLEMENTED]): The id of the chat. Leave it empty for generating a new chat.
  • Call the REST API by cURL
    curl -v -H "Authorization: Bearer PERSONAL_ACCESS_TOKEN" https://api.anysolve.ai/rest/v1/intern-gpt-chat-completion/1.0.0?prompt=Name%20some%20states%20of%20the%20USA&context=You%20are%20a%20president%20of%20the%20USA&engine=gpt-3.5-turbo&allow_plugins=false&plugin_tasks=intern-web-google-search-1-0-0&show_chat=false&chat_id=
  • 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('intern-gpt-chat-completion','1.0.0', {'prompt': 'Name some states of the USA', 'context': 'You are a president of the USA', 'engine': 'gpt-3.5-turbo', 'allow_plugins': 'false', 'plugin_tasks': 'intern-web-google-search-1-0-0', 'show_chat': 'false', 'chat_id': ''})
    print(res)
  • Coming soon: Within AnySolve ChatComplete prompts you can use the following command to execute the task:
    /run('intern-gpt-chat-completion','1.0.0', prompt='Name some states of the USA', context='You are a president of the USA', engine='gpt-3.5-turbo', allow_plugins='false', plugin_tasks='intern-web-google-search-1-0-0', show_chat='false', chat_id='')