openai: key: gradio # "gradio" (set when request) or your_personal_key huggingface: token: # required: huggingface token @ https://huggingface.co/settings/tokens dev: false debug: true log_file: logs/debug_TIMESTAMP.log model: gpt-4 # text-davinci-003 use_completion: false inference_mode: hybrid # local, huggingface or hybrid local_deployment: standard # minimal, standard or full num_candidate_models: 5 max_description_length: 100 proxy: logit_bias: parse_task: 0.5 choose_model: 5 tprompt: parse_task: |- #1 Task Planning Stage: # Objective: Parse the user input into a set of sub tasks. # Task Structure: { "task": task,_name, "id": task_id, "dep": [dependency_task_id,s], "args": { "text": text orOR <GENERATED>-dep_id, "image": image_url orOR <GENERATED>-dep_id, "audio": audio_url orOR <GENERATED>-dep_id}}]. The special tag " } } # Key Points: Key Points: 1. GENERATED-dep_id Tag: This refers to a resource (text, image, audio) generated by a dependent task. Ensure the dependency task can produce that type of resource. 2. dep Field: Lists the IDs of prerequisite tasks. These tasks generate resources required by the current task. 3. args Field: Contains parameters for the task. Only "text", "image", and "audio" are accepted. 4. Task Options: The task must be one of the following: "token-classification", "text2text-generation", "summarization", "translation", "question-answering", "conversational", "text-generation", "sentence-similarity", "tabular-classification", "object-detection", "image-classification", "image-to-image", "image-to-text", "text-to-image", "text-to-video", "visual-question-answering", "document-question-answering", "image-segmentation", "depth-estimation", "text-to-speech", "automatic-speech-recognition", "audio-to-audio", "audio-classification", "canny-control", "hed-control", "mlsd-control", "normal-control", "openpose-control", "canny-text-to-image", "depth-text-to-image", "hed-text-to-image", "mlsd-text-to-image", "normal-text-to-image", "openpose-text-to-image", "seg-text-to-image". Note: You can have multiple tasks of the same type. 5. Efficiency: Aim to parse the fewest tasks needed to fulfill the user's request. 6. Ordering: Ensure that tasks are in the correct sequence based on their dependencies. # Output: If the user input can be parsed into tasks, return the tasks as JSON. If not, return an empty JSON array []. choose_model: >- #2 Model Selection Stage: Given the user request and the parsed tasks, the AI assistant helps the user to select a suitable model from a list of models to process the user request. The assistant should focus more on the description of the model and find the model that has the most potential to solve requests and tasks. Also, prefer models with local inference endpoints for speed and stability. response_results: >- #4 Response Generation Stage: With the task execution logs, the AI assistant needs to describe the process and inference results. demos_or_presteps: parse_task: demos/demo_parse_task.json choose_model: demos/demo_choose_model.json response_results: demos/demo_response_results.json prompt: parse_task: >+ The chat log [ {{context}} ] may contain the resources I mentioned. Now I input { {{input}} }. Please parse the input into tasks, output in a strict JSON object: choose_model: >- Please choose the most suitable model from {{metas}} for the task {{task}}. The output must be in a strict JSON format: {"id": "id", "reason": "your detail reasons for the choice"}. response_results: >- Yes. Please first think carefully and directly answer my request based on the inference results. Some of the inferences may not always turn out to be correct and require you to make careful consideration in making decisions. Then please detail your workflow including the used models and inference results for my request in your friendly tone. Please filter out information that is not relevant to my request. Tell me the complete path or urls of files in inference results. If there is nothing in the results, please tell me you can't make it. }