llmtuner.interface ================== .. py:module:: llmtuner.interface Classes ------- .. autoapisummary:: llmtuner.interface.Interface Module Contents --------------- .. py:class:: Interface(interfaceid='', config='') Base class to handle an interfaces to servers or webpages. .. !! processed by numpydoc !! .. py:attribute:: interfaceid :value: '' .. py:attribute:: baseurl :value: '' .. py:attribute:: authkey :value: '' .. py:attribute:: basicauth :value: None .. py:attribute:: headers .. py:method:: _set_config(configdict={}) Set configuration of interface if in cofiguration .. !! processed by numpydoc !! .. py:method:: update_config(valuedict) Updates interface configuration from dictionary. Should contain parameters for configuration: {'base_url': 'https://...', 'api_key': 'your_key_ ...', 'interfaceid': 'name_of_interface' ...} .. !! processed by numpydoc !! .. py:method:: _make_header(add_dict={}, delete_list=[]) Modify standard header by deleting entries (delete_list) or adding entries (add_dict) .. !! processed by numpydoc !! .. py:method:: _get(endpoint, query='', params={}, set_query_from_params=False) Basic get from endpoint. If 'set_query_from_params', the query will be produced with key-value pairs as direct part of the URL. .. !! processed by numpydoc !! .. py:method:: _post(endpoint, query, data, content_type='', passdata='files') Basic post to server for given endpoint, query string and accompanying data, if 'usedata' the data is passed to the 'data' argument. .. !! processed by numpydoc !! .. py:method:: _delete(endpoint, data={}) Basic delete command to API .. !! processed by numpydoc !!