> ## Documentation Index
> Fetch the complete documentation index at: https://docs.honeyhive.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Update an existing configuration



## OpenAPI

````yaml put /configurations/{id}
openapi: 3.0.3
info:
  title: HoneyHive API
  version: 1.0.1
servers:
  - url: https://api.honeyhive.ai
security:
  - BearerAuth: []
paths:
  /configurations/{id}:
    put:
      tags:
        - Configurations
      summary: Update an existing configuration
      operationId: updateConfiguration
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Configuration ID like `6638187d505c6812e4043f24`
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PutConfigurationRequest'
      responses:
        '200':
          description: Configuration updated successfully
      x-codeSamples:
        - lang: python
          label: updateConfiguration
          source: >-
            import honeyhive

            from honeyhive.models import components


            s = honeyhive.HoneyHive(
                bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
            )



            res = s.configurations.update_configuration(id='<value>',
            put_configuration_request=components.PutConfigurationRequest(
                project='New Project',
                name='function-v0',
                provider='openai',
                parameters=components.PutConfigurationRequestParameters(
                    call_type=components.PutConfigurationRequestCallType.CHAT,
                    model='gpt-4-turbo-preview',
                    hyperparameters={
                        'temperature': 0,
                        'max_tokens': 1000,
                        'top_p': 1,
                        'top_k': -1,
                        'frequency_penalty': 0,
                        'presence_penalty': 0,
                        'stop_sequences': [
                            '<value>',
                        ],
                    },
                    response_format=components.PutConfigurationRequestResponseFormat(),
                    selected_functions=[
                        components.PutConfigurationRequestSelectedFunctions(
                            id='64e3ba90e81f9b3a3808c27f',
                            name='get_google_information',
                            description='Get information from Google when you do not have that information in your context',
                            parameters={
                                'type': 'object',
                                'properties': {
                                    'query': {
                                        'type': 'string',
                                        'description': 'The query asked by the user',
                                    },
                                },
                                'required': [
                                    'query',
                                ],
                            },
                        ),
                    ],
                    function_call_params=components.PutConfigurationRequestFunctionCallParams.AUTO,
                    force_function={

                    },
                    additional_properties={
                        'template': [
                            {
                                'role': 'system',
                                'content': 'You are a web search assistant.',
                            },
                            {
                                'role': 'user',
                                'content': '{{ query }}',
                            },
                        ],
                    },
                ),
                env=[
                    components.PutConfigurationRequestEnv.STAGING,
                ],
                type=components.PutConfigurationRequestType.LLM,
                user_properties={
                    'user_id': 'google-oauth2|108897808434934946583',
                    'user_name': 'Dhruv Singh',
                    'user_picture': 'https://lh3.googleusercontent.com/a/ACg8ocLyQilNtK9RIv4M0p-0FBSbxljBP0p5JabnStku1AQKtFSK=s96-c',
                    'user_email': 'dhruv@honeyhive.ai',
                },
            ))


            if res is not None:
                # handle response
                pass
        - lang: typescript
          label: updateConfiguration
          source: >-
            import { HoneyHive } from "honeyhive";

            import { PutConfigurationRequest, PutConfigurationRequestEnv,
            PutConfigurationRequestType } from
            "honeyhive/dist/models/components";

            import { UpdateConfigurationRequest } from
            "honeyhive/dist/models/operations";


            async function run() {
              const sdk = new HoneyHive({
                bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
              });
            const id: string = "<value>";

            const putConfigurationRequest: PutConfigurationRequest = {
              project: "New Project",
              name: "function-v0",
              provider: "openai",
              parameters: {
                "call_type": "chat",
                "model": "gpt-4-turbo-preview",
                "hyperparameters": {
                  "temperature": 0,
                  "max_tokens": 1000,
                  "top_p": 1,
                  "top_k": -1,
                  "frequency_penalty": 0,
                  "presence_penalty": 0,
                  "stop_sequences": [
                    "<value>",
                  ],
                },
                "responseFormat": {
                  "type": "text",
                },
                "selectedFunctions": [
                  {
                    "id": "64e3ba90e81f9b3a3808c27f",
                    "name": "get_google_information",
                    "description": "Get information from Google when you do not have that information in your context",
                    "parameters": {
                      "type": "object",
                      "properties": {
                        "query": {
                          "type": "string",
                          "description": "The query asked by the user",
                        },
                      },
                      "required": [
                        "query",
                      ],
                    },
                  },
                ],
                "functionCallParams": "auto",
                "forceFunction": {

                },
                "template": [
                  {
                    "role": "system",
                    "content": "You are a web search assistant.",
                  },
                  {
                    "role": "user",
                    "content": "{{ query }}",
                  },
                ],
              },
              env: [
                PutConfigurationRequestEnv.Staging,
              ],
              type: PutConfigurationRequestType.Llm,
              userProperties: {
                "user_id": "google-oauth2|108897808434934946583",
                "user_name": "Dhruv Singh",
                "user_picture": "https://lh3.googleusercontent.com/a/ACg8ocLyQilNtK9RIv4M0p-0FBSbxljBP0p5JabnStku1AQKtFSK=s96-c",
                "user_email": "dhruv@honeyhive.ai",
              },
            };

              const res = await sdk.configurations.updateConfiguration(id, putConfigurationRequest);

              if (res.statusCode == 200) {
                // handle response
              }
            }


            run();
components:
  schemas:
    PutConfigurationRequest:
      type: object
      properties:
        project:
          type: string
          description: Name of the project to which this configuration belongs
        name:
          type: string
          description: Name of the configuration
        provider:
          type: string
          description: Name of the provider - "openai", "anthropic", etc.
        parameters:
          type: object
          additionalProperties: true
          properties:
            call_type:
              type: string
              enum:
                - chat
                - completion
              description: Type of API calling - "chat" or "completion"
            model:
              type: string
              description: Model unique name
            hyperparameters:
              type: object
              description: Model-specific hyperparameters
              additionalProperties: true
            responseFormat:
              type: object
              description: >-
                Response format for the model with the key "type" and value
                "text" or "json_object"
            selectedFunctions:
              type: array
              description: >-
                List of functions to be called by the model, refer to OpenAI
                schema for more details
              items:
                type: object
                properties:
                  id:
                    type: string
                    description: UUID of the function
                  name:
                    type: string
                    description: Name of the function
                  description:
                    type: string
                    description: Description of the function
                  parameters:
                    type: object
                    additionalProperties: true
                    description: Parameters for the function
            functionCallParams:
              type: string
              enum:
                - none
                - auto
                - force
              description: Function calling mode - "none", "auto" or "force"
            forceFunction:
              type: object
              additionalProperties: true
              description: Force function-specific parameters
          required:
            - call_type
            - model
        env:
          type: array
          description: List of environments where the configuration is active
          items:
            type: string
            enum:
              - dev
              - staging
              - prod
        type:
          type: string
          enum:
            - LLM
            - pipeline
          description: Type of the configuration - "LLM" or "pipeline" - "LLM" by default
        user_properties:
          type: object
          additionalProperties: true
          description: Details of user who created the configuration
      required:
        - project
        - name
        - provider
        - parameters
      example:
        project: New Project
        name: function-v0
        provider: openai
        parameters:
          call_type: chat
          model: gpt-4-turbo-preview
          hyperparameters:
            temperature: 0
            max_tokens: 1000
            top_p: 1
            top_k: -1
            frequency_penalty: 0
            presence_penalty: 0
            stop_sequences: []
          responseFormat:
            type: text
          selectedFunctions:
            - id: 64e3ba90e81f9b3a3808c27f
              name: get_google_information
              description: >-
                Get information from Google when you do not have that
                information in your context
              parameters:
                type: object
                properties:
                  query:
                    type: string
                    description: The query asked by the user
                required:
                  - query
          functionCallParams: auto
          forceFunction: {}
          template:
            - role: system
              content: You are a web search assistant.
            - role: user
              content: '{{ query }}'
        env:
          - staging
        type: LLM
        tags: []
        user_properties:
          user_id: google-oauth2|108897808434934946583
          user_name: Dhruv Singh
          user_picture: >-
            https://lh3.googleusercontent.com/a/ACg8ocLyQilNtK9RIv4M0p-0FBSbxljBP0p5JabnStku1AQKtFSK=s96-c
          user_email: dhruv@honeyhive.ai
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````