code: def api_completion():
      data = request.json
      start_time = time.time()
      if data.get("stream") == "True":
          data["stream"] = True  # convert to boolean
      try:
          if "prompt" not in data:
              raise ValueError("data needs to have prompt")
          data[
              "model"
          ] = "togethercomputer/CodeLlama-34b-Instruct"  # by default use Together AI's CodeLlama model - https://api.together.xyz/playground/chat?model=togethercomputer%2FCodeLlama-34b-Instruct
          # COMPLETION CALL
          system_prompt = "Only respond to questions about code. Say 'I don't know' to anything outside of that."
          messages = [
              {"role": "system", "content": system_prompt},
              {"role": "user", "content": data.pop("prompt")},
          ]
          data["messages"] = messages
          print(f"data: {data}")
          response = completion(**data)
          ## LOG SUCCESS
          end_time = time.time()
          if (
              "stream" in data and data["stream"] == True
          ):  # use generate_responses to stream responses
              return Response(
                  data_generator(response), mimetype="text/event-stream"
              )
      except Exception as e:
          # call handle_error function
          print_verbose(
              f"Got Error api_completion(): {traceback.format_exc()}"
          )
          ## LOG FAILURE
          end_time = time.time()
          traceback_exception = traceback.format_exc()
          return handle_error(data=data)
      return response
  
file_path: litellm/cookbook/codellama-server/main.py
imports: import traceback
  from flask import Flask, request, jsonify, abort, Response
  from flask_cors import CORS
  import traceback
  import litellm
  from util import handle_error
  from litellm import completion
  import os, dotenv, time
  import json
label_desc: Use image node_id 4 for calling a global function with example usage: api_completion() and returns: response, Response, handle_error