Skip to main content
Glama

Model Context Protocol Server

openai_service.cpython-312.pyc1.31 kB
� @i�h���<�ddlZddlmZee_dededzfd�Zy)�N)�OPENAI_API_KEY�history�returnc�4�ddd�}|g|z} tjs td��tjjj d|��}|j djjS#t$r}td|���Yd }~y d }~wwxYw) u8Konuşma geçmişini alarak OpenAI'dan bir yanıt ister.�systemz)You are a helpful and friendly assistant.)�role�contentu$OpenAI API anahtarı ayarlanmamış.z gpt-3.5-turbo)�model�messagesru)OpenAI API ile iletişimde hata oluştu: N) �openai�api_key� ValueError�chat� completions�create�choices�messager � Exception�print)r� system_prompt�messages_to_send�response�es �>/workspaces/MCP-Server/modul2_ders4/services/openai_service.py�get_ai_responsers����>��M� &���0�� ��~�~��C�D� D��;�;�*�*�1�1�!�%�2� ������"�*�*�2�2�2�� �� �9�!��=�>����s�A(A6�6 B�?B�B)r � core.configrr �list�strr��r�<module>r!s+�� �&� ����T��c�D�j�r

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/BilgisayarKavramlari/MCP-Server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server