Local Setup

Learn how to set up and run InternTA locally.

Prerequisites

Quick Installation

# Clone the repository
git clone https://github.com/kongfoo-ai/internTA

# Go to the project directory
cd InternTA

# Install the dependencies
pip install -r requirements.txt

API Integration

Authentication

To use the InternTA API, you’ll need to include a bearer token in your requests:
curl -X POST "https://api.ecopi.chat/v1/chat/completions" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "internta-v02",
    "messages": [
      {"role": "system", "content": "You are a helpful assistant."},
      {"role": "user", "content": "Can you teach me some synthetic biology?"}
    ]
  }'

Example Response

{
  "id": "chatcmpl-1753709210352",
  "object": "chat.completion",
  "created": 1753709210,
  "model": "internta-v02",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Sure! Synthetic biology is an interdisciplinary field that combines biology, engineering, and computer science to design and construct new biological parts, devices, and systems. Here are some key concepts and areas within synthetic biology:\n\n1. **Basic Concepts**:\n   - **DNA as a Programming Language**: In synthetic biology, DNA is often viewed as a code that can be manipulated to create new functions in organisms.\n   - **Genetic Engineering**: Techniques like CRISPR-Cas9 allow scientists to edit genes with precision, enabling the modification of organisms for desired traits.\n\n2. **Key Techniques**:\n   - **Gene Synthesis**: The process of artificially creating genes in the lab, allowing for the design of new genetic sequences.\n   - **Pathway Engineering**: Modifying metabolic pathways in organisms to produce desired compounds, such as biofuels or pharmaceuticals.\n   - **Synthetic Circuits**: Creating genetic circuits that can control gene expression in response to specific signals, similar to electronic circuits.\n\n3. **Applications**:\n   - **Medicine**: Developing new therapies, vaccines, and diagnostic tools. For example, engineered bacteria can be used to produce insulin.\n   - **Agriculture**: Creating genetically modified crops that are resistant to pests or have enhanced nutritional value.\n   - **Environmental**: Engineering microbes to degrade pollutants or capture carbon dioxide.\n\n4. **Ethical Considerations**:\n   - The manipulation of life forms raises ethical questions about safety, biodiversity, and the potential consequences of releasing engineered organisms into the environment.\n\n5. **Future Directions**:\n   - Advances in synthetic biology could lead to breakthroughs in personalized medicine, sustainable energy, and innovative materials.\n\nIf you have specific topics or questions within synthetic biology that you'd like to explore further, feel free to ask!"
      },
      "logprobs": null,
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 100,
    "completion_tokens": 10,
    "total_tokens": 110
  },
  "system_fingerprint": "fp_2f57f81c11"
}

Advanced Usage

Training Your Own Model

Model Evaluation

To evaluate the model’s performance:
# Run evaluation tests
pytest ./test/test_model_evaluation.py
This will generate a test_results.csv file containing ROUGE similarity scores for model responses.

Resources